char *cdtext_c = "$Id: vectortext.c,v 1.2 2005/08/19 03:53:41 scuri Exp $";

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include "cd.h"
#include "wd.h"
#include "cdprivat.h"


typedef struct cdOperation
{
  char operation;
  signed char x, y;
} cdOperation;

typedef struct cdCaracter
{
  int right, center, operations;
  cdOperation *p;
} cdCaracter;

typedef struct _cdPrivateVectorFont
{
  char name[256];         /* font name */
  char file_name[1024];   /* font file name */
  cdCaracter *chars;      /* array of characters */

  int top,                /* from baseline to top */
      cap,                /* from baseline to cap (top of chars) */
      half,               /* half between top and bottom UNUSED */
      bottom;             /* from baseline to bottom (negative) */
  double point_size_x, point_size_y; /* internal char size proportional to "top" */
  double current_cos, current_sin;   /* text direction */
  int space, line_space;             /* space between chars and lines */

  /* general transformation matrix */
  int text_transf;
  double text_matrix[6];
} cdPrivateVectorFont;


static unsigned char ansi2ascii[] =
{0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 
62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 
119, 120, 121, 122, 123, 124, 125, 126, 127, 63, 63, 39, 159, 34, 46, 197, 206, 94, 37, 83, 60, 79, 63, 90, 63, 63, 39, 39, 
34, 34, 7, 45, 45, 126, 84, 115, 62, 111, 63, 122, 89, 255, 173, 189, 156, 207, 190, 221, 245, 249, 184, 166, 174, 170, 240, 
169, 238, 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168, 183, 181, 182, 199, 142, 143, 146, 
128, 212, 144, 210, 211, 222, 214, 215, 216, 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225, 
133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139, 208, 164, 149, 162, 147, 228, 148, 246, 155, 
151, 163, 150, 129, 236, 231, 152};

/******************************************************/
/* descricao do fonte default                         */
/******************************************************/

static int default_top    = 28;
static int default_cap    = 28;
static int default_half   = 14;
static int default_bottom = -7;

static cdOperation char_33[] = {
{'m', 1, 21},
{'l', 1, 7},
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation char_34[] = {
{'m', 1, 21},
{'l', 0, 20},
{'l', 0, 14},
{'m', 1, 20},
{'l', 0, 14},
{'m', 1, 21},
{'l', 2, 20},
{'l', 0, 14},
{'m', 10, 21},
{'l', 9, 20},
{'l', 9, 14},
{'m', 10, 20},
{'l', 9, 14},
{'m', 10, 21},
{'l', 11, 20},
{'l', 9, 14},
};
static cdOperation char_35[] = {
{'m', 8, 21},
{'l', 1, -7},
{'m', 14, 21},
{'l', 7, -7},
{'m', 1, 10},
{'l', 15, 10},
{'m', 0, 4},
{'l', 14, 4},
};
static cdOperation char_36[] = {
{'m', 5, 25},
{'l', 5, -4},
{'m', 9, 25},
{'l', 9, -4},
{'m', 13, 18},
{'l', 12, 17},
{'l', 13, 16},
{'l', 14, 17},
{'l', 14, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 14},
{'l', 2, 13},
{'l', 4, 12},
{'l', 10, 10},
{'l', 12, 9},
{'l', 14, 7},
{'m', 0, 16},
{'l', 2, 14},
{'l', 4, 13},
{'l', 10, 11},
{'l', 12, 10},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 3},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 0, 3},
{'l', 0, 4},
{'l', 1, 5},
{'l', 2, 4},
{'l', 1, 3},
};
static cdOperation char_37[] = {
{'m', 18, 21},
{'l', 0, 0},
{'m', 5, 21},
{'l', 7, 19},
{'l', 7, 17},
{'l', 6, 15},
{'l', 4, 14},
{'l', 2, 14},
{'l', 0, 16},
{'l', 0, 18},
{'l', 1, 20},
{'l', 3, 21},
{'l', 5, 21},
{'l', 7, 20},
{'l', 10, 19},
{'l', 13, 19},
{'l', 16, 20},
{'l', 18, 21},
{'m', 14, 7},
{'l', 12, 6},
{'l', 11, 4},
{'l', 11, 2},
{'l', 13, 0},
{'l', 15, 0},
{'l', 17, 1},
{'l', 18, 3},
{'l', 18, 5},
{'l', 16, 7},
{'l', 14, 7},
};
static cdOperation char_38[] = {
{'m', 18, 13},
{'l', 17, 12},
{'l', 18, 11},
{'l', 19, 12},
{'l', 19, 13},
{'l', 18, 14},
{'l', 17, 14},
{'l', 16, 13},
{'l', 15, 11},
{'l', 13, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 1, 1},
{'l', 0, 3},
{'l', 0, 6},
{'l', 1, 8},
{'l', 7, 12},
{'l', 9, 14},
{'l', 10, 16},
{'l', 10, 18},
{'l', 9, 20},
{'l', 7, 21},
{'l', 5, 20},
{'l', 4, 18},
{'l', 4, 16},
{'l', 5, 13},
{'l', 7, 10},
{'l', 12, 3},
{'l', 14, 1},
{'l', 17, 0},
{'l', 18, 0},
{'l', 19, 1},
{'l', 19, 2},
{'m', 4, 0},
{'l', 2, 1},
{'l', 1, 3},
{'l', 1, 6},
{'l', 2, 8},
{'l', 4, 10},
{'m', 4, 16},
{'l', 5, 14},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
};
static cdOperation char_39[] = {
{'m', 1, 19},
{'l', 0, 20},
{'l', 1, 21},
{'l', 2, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 15},
};
static cdOperation char_40[] = {
{'m', 7, 25},
{'l', 5, 23},
{'l', 3, 20},
{'l', 1, 16},
{'l', 0, 11},
{'l', 0, 7},
{'l', 1, 2},
{'l', 3, -2},
{'l', 5, -5},
{'l', 7, -7},
{'m', 5, 23},
{'l', 3, 19},
{'l', 2, 16},
{'l', 1, 11},
{'l', 1, 7},
{'l', 2, 2},
{'l', 3, -1},
{'l', 5, -5},
};
static cdOperation char_41[] = {
{'m', 0, 25},
{'l', 2, 23},
{'l', 4, 20},
{'l', 6, 16},
{'l', 7, 11},
{'l', 7, 7},
{'l', 6, 2},
{'l', 4, -2},
{'l', 2, -5},
{'l', 0, -7},
{'m', 2, 23},
{'l', 4, 19},
{'l', 5, 16},
{'l', 6, 11},
{'l', 6, 7},
{'l', 5, 2},
{'l', 4, -1},
{'l', 2, -5},
};
static cdOperation char_42[] = {
{'m', 5, 21},
{'l', 5, 9},
{'m', 0, 18},
{'l', 10, 12},
{'m', 10, 18},
{'l', 0, 12},
};
static cdOperation char_43[] = {
{'m', 9, 18},
{'l', 9, 0},
{'m', 0, 9},
{'l', 18, 9},
};
static cdOperation char_44[] = {
{'m', 2, 1},
{'l', 1, 0},
{'l', 0, 1},
{'l', 1, 2},
{'l', 2, 1},
{'l', 2, -1},
{'l', 1, -3},
{'l', 0, -4},
};
static cdOperation char_45[] = {
{'m', 0, 9},
{'l', 18, 9},
};
static cdOperation char_46[] = {
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation char_47[] = {
{'m', 0, -3},
{'l', 14, 21},
};
static cdOperation char_48[] = {
{'m', 6, 21},
{'l', 3, 20},
{'l', 1, 17},
{'l', 0, 12},
{'l', 0, 9},
{'l', 1, 4},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 4},
{'l', 14, 9},
{'l', 14, 12},
{'l', 13, 17},
{'l', 11, 20},
{'l', 8, 21},
{'l', 6, 21},
};
static cdOperation char_49[] = {
{'m', 0, 17},
{'l', 2, 18},
{'l', 5, 21},
{'l', 5, 0},
};
static cdOperation char_50[] = {
{'m', 1, 16},
{'l', 1, 17},
{'l', 2, 19},
{'l', 3, 20},
{'l', 5, 21},
{'l', 9, 21},
{'l', 11, 20},
{'l', 12, 19},
{'l', 13, 17},
{'l', 13, 15},
{'l', 12, 13},
{'l', 10, 10},
{'l', 0, 0},
{'l', 14, 0},
};
static cdOperation char_51[] = {
{'m', 2, 21},
{'l', 13, 21},
{'l', 7, 13},
{'l', 10, 13},
{'l', 12, 12},
{'l', 13, 11},
{'l', 14, 8},
{'l', 14, 6},
{'l', 13, 3},
{'l', 11, 1},
{'l', 8, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
};
static cdOperation char_52[] = {
{'m', 10, 21},
{'l', 0, 7},
{'l', 15, 7},
{'m', 10, 21},
{'l', 10, 0},
};
static cdOperation char_53[] = {
{'m', 12, 21},
{'l', 2, 21},
{'l', 1, 12},
{'l', 2, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 11, 13},
{'l', 13, 11},
{'l', 14, 8},
{'l', 14, 6},
{'l', 13, 3},
{'l', 11, 1},
{'l', 8, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
};
static cdOperation char_54[] = {
{'m', 12, 18},
{'l', 11, 20},
{'l', 8, 21},
{'l', 6, 21},
{'l', 3, 20},
{'l', 1, 17},
{'l', 0, 12},
{'l', 0, 7},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 7, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 7},
{'l', 12, 10},
{'l', 10, 12},
{'l', 7, 13},
{'l', 6, 13},
{'l', 3, 12},
{'l', 1, 10},
{'l', 0, 7},
};
static cdOperation char_55[] = {
{'m', 14, 21},
{'l', 4, 0},
{'m', 0, 21},
{'l', 14, 21},
};
static cdOperation char_56[] = {
{'m', 5, 21},
{'l', 2, 20},
{'l', 1, 18},
{'l', 1, 16},
{'l', 2, 14},
{'l', 4, 13},
{'l', 8, 12},
{'l', 11, 11},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 4},
{'l', 13, 2},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
{'l', 0, 7},
{'l', 1, 9},
{'l', 3, 11},
{'l', 6, 12},
{'l', 10, 13},
{'l', 12, 14},
{'l', 13, 16},
{'l', 13, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
};
static cdOperation char_57[] = {
{'m', 13, 14},
{'l', 12, 11},
{'l', 10, 9},
{'l', 7, 8},
{'l', 6, 8},
{'l', 3, 9},
{'l', 1, 11},
{'l', 0, 14},
{'l', 0, 15},
{'l', 1, 18},
{'l', 3, 20},
{'l', 6, 21},
{'l', 7, 21},
{'l', 10, 20},
{'l', 12, 18},
{'l', 13, 14},
{'l', 13, 9},
{'l', 12, 4},
{'l', 10, 1},
{'l', 7, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 1, 3},
};
static cdOperation char_58[] = {
{'m', 1, 14},
{'l', 0, 13},
{'l', 1, 12},
{'l', 2, 13},
{'l', 1, 14},
{'m', 1, 2},
{'l', 0, 1},
{'l', 1, 0},
{'l', 2, 1},
{'l', 1, 2},
};
static cdOperation char_59[] = {
{'m', 1, 14},
{'l', 0, 13},
{'l', 1, 12},
{'l', 2, 13},
{'l', 1, 14},
{'m', 2, 1},
{'l', 1, 0},
{'l', 0, 1},
{'l', 1, 2},
{'l', 2, 1},
{'l', 2, -1},
{'l', 1, -3},
{'l', 0, -4},
};
static cdOperation char_60[] = {
{'m', 16, 18},
{'l', 0, 9},
{'l', 16, 0},
};
static cdOperation char_61[] = {
{'m', 0, 12},
{'l', 18, 12},
{'m', 0, 6},
{'l', 18, 6},
};
static cdOperation char_62[] = {
{'m', 0, 18},
{'l', 16, 9},
{'l', 0, 0},
};
static cdOperation char_63[] = {
{'m', 0, 16},
{'l', 0, 17},
{'l', 1, 19},
{'l', 2, 20},
{'l', 4, 21},
{'l', 8, 21},
{'l', 10, 20},
{'l', 11, 19},
{'l', 12, 17},
{'l', 12, 15},
{'l', 11, 13},
{'l', 10, 12},
{'l', 6, 10},
{'l', 6, 7},
{'m', 6, 2},
{'l', 5, 1},
{'l', 6, 0},
{'l', 7, 1},
{'l', 6, 2},
};
static cdOperation char_64[] = {
{'m', 15, 13},
{'l', 14, 15},
{'l', 12, 16},
{'l', 9, 16},
{'l', 7, 15},
{'l', 6, 14},
{'l', 5, 11},
{'l', 5, 8},
{'l', 6, 6},
{'l', 8, 5},
{'l', 11, 5},
{'l', 13, 6},
{'l', 14, 8},
{'m', 9, 16},
{'l', 7, 14},
{'l', 6, 11},
{'l', 6, 8},
{'l', 7, 6},
{'l', 8, 5},
{'m', 15, 16},
{'l', 14, 8},
{'l', 14, 6},
{'l', 16, 5},
{'l', 18, 5},
{'l', 20, 7},
{'l', 21, 10},
{'l', 21, 12},
{'l', 20, 15},
{'l', 19, 17},
{'l', 17, 19},
{'l', 15, 20},
{'l', 12, 21},
{'l', 9, 21},
{'l', 6, 20},
{'l', 4, 19},
{'l', 2, 17},
{'l', 1, 15},
{'l', 0, 12},
{'l', 0, 9},
{'l', 1, 6},
{'l', 2, 4},
{'l', 4, 2},
{'l', 6, 1},
{'l', 9, 0},
{'l', 12, 0},
{'l', 15, 1},
{'l', 17, 2},
{'l', 18, 3},
{'m', 16, 16},
{'l', 15, 8},
{'l', 15, 6},
{'l', 16, 5},
};
static cdOperation char_65[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
};
static cdOperation char_66[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 9, 21},
{'l', 12, 20},
{'l', 13, 19},
{'l', 14, 17},
{'l', 14, 15},
{'l', 13, 13},
{'l', 12, 12},
{'l', 9, 11},
{'m', 0, 11},
{'l', 9, 11},
{'l', 12, 10},
{'l', 13, 9},
{'l', 14, 7},
{'l', 14, 4},
{'l', 13, 2},
{'l', 12, 1},
{'l', 9, 0},
{'l', 0, 0},
};
static cdOperation char_67[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
};
static cdOperation char_68[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 7, 21},
{'l', 10, 20},
{'l', 12, 18},
{'l', 13, 16},
{'l', 14, 13},
{'l', 14, 8},
{'l', 13, 5},
{'l', 12, 3},
{'l', 10, 1},
{'l', 7, 0},
{'l', 0, 0},
};
static cdOperation char_69[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
};
static cdOperation char_70[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 13, 21},
{'m', 0, 11},
{'l', 8, 11},
};
static cdOperation char_71[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 15, 8},
{'m', 10, 8},
{'l', 15, 8},
};
static cdOperation char_72[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 14, 21},
{'l', 14, 0},
{'m', 0, 11},
{'l', 14, 11},
};
static cdOperation char_73[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation char_74[] = {
{'m', 10, 21},
{'l', 10, 5},
{'l', 9, 2},
{'l', 8, 1},
{'l', 6, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 5},
{'l', 0, 7},
};
static cdOperation char_75[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 14, 21},
{'l', 0, 7},
{'m', 5, 12},
{'l', 14, 0},
};
static cdOperation char_76[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 0},
{'l', 12, 0},
};
static cdOperation char_77[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 16, 0},
};
static cdOperation char_78[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 14, 0},
{'m', 14, 21},
{'l', 14, 0},
};
static cdOperation char_79[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
};
static cdOperation char_80[] = {
{'m', 0, 10},
{'l', 9, 10},
{'l', 12, 11},
{'l', 13, 12},
{'l', 14, 14},
{'l', 14, 17},
{'l', 13, 19},
{'l', 12, 20},
{'l', 9, 21},
{'l', 0, 21},
{'l', 0, 0},
};
static cdOperation char_81[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 9, 4},
{'l', 15, -2},
};
static cdOperation char_82[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 9, 21},
{'l', 12, 20},
{'l', 13, 19},
{'l', 14, 17},
{'l', 14, 15},
{'l', 13, 13},
{'l', 12, 12},
{'l', 9, 11},
{'l', 0, 11},
{'m', 7, 11},
{'l', 14, 0},
};
static cdOperation char_83[] = {
{'m', 14, 18},
{'l', 12, 20},
{'l', 9, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 14},
{'l', 2, 13},
{'l', 4, 12},
{'l', 10, 10},
{'l', 12, 9},
{'l', 13, 8},
{'l', 14, 6},
{'l', 14, 3},
{'l', 12, 1},
{'l', 9, 0},
{'l', 5, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation char_84[] = {
{'m', 7, 21},
{'l', 7, 0},
{'m', 0, 21},
{'l', 14, 21},
};
static cdOperation char_85[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
};
static cdOperation char_86[] = {
{'m', 0, 21},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 0},
};
static cdOperation char_87[] = {
{'m', 0, 21},
{'l', 5, 0},
{'m', 10, 21},
{'l', 5, 0},
{'m', 10, 21},
{'l', 15, 0},
{'m', 20, 21},
{'l', 15, 0},
};
static cdOperation char_88[] = {
{'m', 0, 21},
{'l', 14, 0},
{'m', 14, 21},
{'l', 0, 0},
};
static cdOperation char_89[] = {
{'m', 0, 21},
{'l', 8, 11},
{'l', 8, 0},
{'m', 16, 21},
{'l', 8, 11},
};
static cdOperation char_90[] = {
{'m', 14, 21},
{'l', 0, 0},
{'m', 0, 21},
{'l', 14, 21},
{'m', 0, 0},
{'l', 14, 0},
};
static cdOperation char_91[] = {
{'m', 0, 19},
{'l', 0, -1},
{'m', 1, 19},
{'l', 1, -1},
{'m', 0, 19},
{'l', 5, 19},
{'m', 0, -1},
{'l', 5, -1},
};
static cdOperation char_92[] = {
{'m', 0, 21},
{'l', 14, -3},
};
static cdOperation char_93[] = {
{'m', 4, 19},
{'l', 4, -1},
{'m', 5, 19},
{'l', 5, -1},
{'m', 0, 19},
{'l', 5, 19},
{'m', 0, -1},
{'l', 5, -1},
};
static cdOperation char_94[] = {
{'m', 8, 18},
{'l', 3, 14},
{'l', 8, 19},
{'l', 13, 14},
{'l', 8, 18},
{'l', 8, 18},
};
static cdOperation char_95[] = {
{'m', 0, -7},
{'l', 16, -7},
};
static cdOperation char_96[] = {
{'m', 2, 21},
{'l', 1, 20},
{'l', 0, 18},
{'l', 0, 16},
{'l', 1, 15},
{'l', 2, 16},
{'l', 1, 17},
};
static cdOperation char_97[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_98[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 11},
{'l', 2, 13},
{'l', 4, 14},
{'l', 7, 14},
{'l', 9, 13},
{'l', 11, 11},
{'l', 12, 8},
{'l', 12, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation char_99[] = {
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_100[] = {
{'m', 12, 21},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_101[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_102[] = {
{'m', 8, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 3, 17},
{'l', 3, 0},
{'m', 0, 14},
{'l', 7, 14},
};
static cdOperation char_103[] = {
{'m', 12, 14},
{'l', 12, -2},
{'l', 11, -5},
{'l', 10, -6},
{'l', 8, -7},
{'l', 5, -7},
{'l', 3, -6},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_104[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
};
static cdOperation char_105[] = {
{'m', 2, 21},
{'l', 3, 20},
{'l', 4, 21},
{'l', 3, 22},
{'l', 2, 21},
{'m', 3, 14},
{'l', 3, 0},
};
static cdOperation char_106[] = {
{'m', 4, 21},
{'l', 5, 20},
{'l', 6, 21},
{'l', 5, 22},
{'l', 4, 21},
{'m', 5, 14},
{'l', 5, -3},
{'l', 4, -6},
{'l', 2, -7},
{'l', 0, -7},
};
static cdOperation char_107[] = {
{'m', 0, 21},
{'l', 0, 0},
{'m', 10, 14},
{'l', 0, 4},
{'m', 4, 8},
{'l', 11, 0},
};
static cdOperation char_108[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation char_109[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
{'m', 11, 10},
{'l', 14, 13},
{'l', 16, 14},
{'l', 19, 14},
{'l', 21, 13},
{'l', 22, 10},
{'l', 22, 0},
};
static cdOperation char_110[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
};
static cdOperation char_111[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
};
static cdOperation char_112[] = {
{'m', 0, 14},
{'l', 0, -7},
{'m', 0, 11},
{'l', 2, 13},
{'l', 4, 14},
{'l', 7, 14},
{'l', 9, 13},
{'l', 11, 11},
{'l', 12, 8},
{'l', 12, 6},
{'l', 11, 3},
{'l', 9, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 0, 3},
};
static cdOperation char_113[] = {
{'m', 12, 14},
{'l', 12, -7},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
};
static cdOperation char_114[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 8},
{'l', 1, 11},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
};
static cdOperation char_115[] = {
{'m', 11, 11},
{'l', 10, 13},
{'l', 7, 14},
{'l', 4, 14},
{'l', 1, 13},
{'l', 0, 11},
{'l', 1, 9},
{'l', 3, 8},
{'l', 8, 7},
{'l', 10, 6},
{'l', 11, 4},
{'l', 11, 3},
{'l', 10, 1},
{'l', 7, 0},
{'l', 4, 0},
{'l', 1, 1},
{'l', 0, 3},
};
static cdOperation char_116[] = {
{'m', 3, 21},
{'l', 3, 4},
{'l', 4, 1},
{'l', 6, 0},
{'l', 8, 0},
{'m', 0, 14},
{'l', 7, 14},
};
static cdOperation char_117[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
};
static cdOperation char_118[] = {
{'m', 0, 14},
{'l', 6, 0},
{'m', 12, 14},
{'l', 6, 0},
};
static cdOperation char_119[] = {
{'m', 0, 14},
{'l', 4, 0},
{'m', 8, 14},
{'l', 4, 0},
{'m', 8, 14},
{'l', 12, 0},
{'m', 16, 14},
{'l', 12, 0},
};
static cdOperation char_120[] = {
{'m', 0, 14},
{'l', 11, 0},
{'m', 11, 14},
{'l', 0, 0},
};
static cdOperation char_121[] = {
{'m', 1, 14},
{'l', 7, 0},
{'m', 13, 14},
{'l', 7, 0},
{'l', 5, -4},
{'l', 3, -6},
{'l', 1, -7},
{'l', 0, -7},
};
static cdOperation char_122[] = {
{'m', 11, 14},
{'l', 0, 0},
{'m', 0, 14},
{'l', 11, 14},
{'m', 0, 0},
{'l', 11, 0},
};
static cdOperation char_123[] = {
{'m', 5, 25},
{'l', 3, 24},
{'l', 2, 23},
{'l', 1, 21},
{'l', 1, 19},
{'l', 2, 17},
{'l', 3, 16},
{'l', 4, 14},
{'l', 4, 12},
{'l', 2, 10},
{'m', 3, 24},
{'l', 2, 22},
{'l', 2, 20},
{'l', 3, 18},
{'l', 4, 17},
{'l', 5, 15},
{'l', 5, 13},
{'l', 4, 11},
{'l', 0, 9},
{'l', 4, 7},
{'l', 5, 5},
{'l', 5, 3},
{'l', 4, 1},
{'l', 3, 0},
{'l', 2, -2},
{'l', 2, -4},
{'l', 3, -6},
{'m', 2, 8},
{'l', 4, 6},
{'l', 4, 4},
{'l', 3, 2},
{'l', 2, 1},
{'l', 1, -1},
{'l', 1, -3},
{'l', 2, -5},
{'l', 3, -6},
{'l', 5, -7},
};
static cdOperation char_124[] = {
{'m', 0, 21},
{'l', 0, 0},
};
static cdOperation char_125[] = {
{'m', 0, 25},
{'l', 2, 24},
{'l', 3, 23},
{'l', 4, 21},
{'l', 4, 19},
{'l', 3, 17},
{'l', 2, 16},
{'l', 1, 14},
{'l', 1, 12},
{'l', 3, 10},
{'m', 2, 24},
{'l', 3, 22},
{'l', 3, 20},
{'l', 2, 18},
{'l', 1, 17},
{'l', 0, 15},
{'l', 0, 13},
{'l', 1, 11},
{'l', 5, 9},
{'l', 1, 7},
{'l', 0, 5},
{'l', 0, 3},
{'l', 1, 1},
{'l', 2, 0},
{'l', 3, -2},
{'l', 3, -4},
{'l', 2, -6},
{'m', 3, 8},
{'l', 1, 6},
{'l', 1, 4},
{'l', 2, 2},
{'l', 3, 1},
{'l', 4, -1},
{'l', 4, -3},
{'l', 3, -5},
{'l', 2, -6},
{'l', 0, -7},
};
static cdOperation char_126[] = {
{'m', 0, 16},
{'l', 5, 19},
{'l', 9, 16},
{'l', 13, 18},
};
static cdOperation char_127[] = {
{'m', 0, 7},
{'l', 0, 0},
{'l', 12, 0},
{'l', 12, 7},
{'l', 6, 16},
{'l', 0, 7},
{'m', 6, 6},
{'l', 6, 6},
};
static cdOperation char_128[] = {
{'m', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'m', 8, 0},
{'l', 8, -1},
{'l', 7, -1},
{'l', 7, 0},
{'m', 3, -4},
{'l', 3, -6},
{'l', 4, -7},
{'l', 10, -7},
{'l', 12, -5},
{'l', 12, -4},
{'l', 10, -2},
{'l', 8, -1},
};
static cdOperation char_129[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 2, 19},
{'l', 1, 18},
{'l', 2, 17},
{'l', 3, 18},
{'l', 2, 19},
{'m', 10, 19},
{'l', 9, 18},
{'l', 10, 17},
{'l', 11, 18},
{'l', 10, 19},
};
static cdOperation char_130[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 10, 22},
{'l', 9, 21},
{'l', 8, 22},
{'l', 9, 23},
{'l', 10, 22},
{'l', 10, 20},
{'l', 5, 17},
};
static cdOperation char_131[] = {
{'m', 13, 14},
{'l', 13, 0},
{'m', 13, 11},
{'l', 11, 13},
{'l', 9, 14},
{'l', 6, 14},
{'l', 4, 13},
{'l', 2, 11},
{'l', 1, 8},
{'l', 1, 6},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 9, 0},
{'l', 11, 1},
{'l', 13, 3},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
{'l', 8, 20},
{'l', 3, 16},
};
static cdOperation char_132[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 2, 19},
{'l', 1, 18},
{'l', 2, 17},
{'l', 3, 18},
{'l', 2, 19},
{'m', 10, 19},
{'l', 9, 18},
{'l', 10, 17},
{'l', 11, 18},
{'l', 10, 19},
};
static cdOperation char_133[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 3, 22},
{'l', 4, 21},
{'l', 5, 22},
{'l', 4, 23},
{'l', 3, 22},
{'l', 3, 20},
{'l', 8, 17},
};
static cdOperation char_134[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 5, 19},
{'l', 4, 18},
{'l', 5, 17},
{'l', 7, 17},
{'l', 8, 18},
{'l', 7, 19},
{'l', 5, 19},
};
static cdOperation char_135[] = {
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 6, 0},
{'l', 6, -1},
{'l', 9, -2},
{'l', 10, -5},
{'l', 8, -7},
{'l', 4, -7},
{'l', 3, -5},
};
static cdOperation char_136[] = {
{'m', 2, 8},
{'l', 14, 8},
{'l', 14, 10},
{'l', 13, 12},
{'l', 12, 13},
{'l', 10, 14},
{'l', 7, 14},
{'l', 5, 13},
{'l', 3, 11},
{'l', 2, 8},
{'l', 2, 6},
{'l', 3, 3},
{'l', 5, 1},
{'l', 7, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'m', 4, 16},
{'l', 9, 21},
{'l', 14, 16},
{'l', 9, 20},
{'l', 4, 16},
};
static cdOperation char_137[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation char_138[] = {
{'m', 0, 8},
{'l', 12, 8},
{'l', 12, 10},
{'l', 11, 12},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 2, 22},
{'l', 3, 21},
{'l', 4, 22},
{'l', 3, 23},
{'l', 2, 22},
{'l', 2, 20},
{'l', 7, 17},
};
static cdOperation char_139[] = {
{'m', 5, 14},
{'l', 5, 0},
{'m', 1, 19},
{'l', 0, 18},
{'l', 1, 17},
{'l', 2, 18},
{'l', 1, 19},
{'m', 9, 19},
{'l', 8, 18},
{'l', 9, 17},
{'l', 10, 18},
{'l', 9, 19},
};
static cdOperation char_140[] = {
{'m', 8, 14},
{'l', 8, 0},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
{'l', 8, 20},
{'l', 3, 16},
};
static cdOperation char_141[] = {
{'m', 5, 14},
{'l', 5, 0},
{'m', 0, 22},
{'l', 1, 21},
{'l', 2, 22},
{'l', 1, 23},
{'l', 0, 22},
{'l', 0, 20},
{'l', 5, 17},
};
static cdOperation char_142[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 4, 25},
{'l', 3, 24},
{'l', 4, 23},
{'l', 5, 24},
{'l', 4, 25},
{'m', 12, 25},
{'l', 11, 24},
{'l', 12, 23},
{'l', 13, 24},
{'l', 12, 25},
};
static cdOperation char_143[] = {
{'m', 16, 0},
{'l', 8, 21},
{'l', 0, 0},
{'m', 3, 7},
{'l', 13, 7},
{'m', 7, 26},
{'l', 6, 25},
{'l', 7, 24},
{'l', 9, 24},
{'l', 10, 25},
{'l', 9, 26},
{'l', 7, 26},
};
static cdOperation char_144[] = {
{'m', 13, 21},
{'l', 0, 21},
{'l', 0, 0},
{'l', 13, 0},
{'m', 0, 11},
{'l', 8, 11},
{'m', 10, 27},
{'l', 9, 26},
{'l', 8, 27},
{'l', 9, 28},
{'l', 10, 27},
{'l', 10, 25},
{'l', 5, 22},
};
static cdOperation char_145[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 17, 14},
{'l', 20, 14},
{'l', 22, 13},
{'l', 23, 12},
{'l', 24, 10},
{'l', 24, 8},
{'l', 12, 8},
{'l', 13, 11},
{'l', 15, 13},
{'l', 17, 14},
{'m', 12, 6},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
{'l', 20, 0},
{'l', 22, 1},
{'l', 24, 3},
};
static cdOperation char_146[] = {
{'m', 23, 21},
{'l', 8, 21},
{'l', 0, 0},
{'m', 10, 21},
{'l', 10, 0},
{'l', 23, 0},
{'m', 10, 11},
{'l', 18, 11},
{'m', 3, 7},
{'l', 10, 7},
};
static cdOperation char_147[] = {
{'m', 6, 14},
{'l', 4, 13},
{'l', 2, 11},
{'l', 1, 8},
{'l', 1, 6},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 9, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 8},
{'l', 13, 11},
{'l', 11, 13},
{'l', 9, 14},
{'l', 6, 14},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
{'l', 8, 20},
{'l', 3, 16},
};
static cdOperation char_148[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation char_149[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 2, 22},
{'l', 3, 21},
{'l', 4, 22},
{'l', 3, 23},
{'l', 2, 22},
{'l', 2, 20},
{'l', 7, 17},
};
static cdOperation char_150[] = {
{'m', 2, 14},
{'l', 2, 4},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 13, 4},
{'m', 13, 14},
{'l', 13, 0},
{'m', 3, 16},
{'l', 8, 21},
{'l', 13, 16},
{'l', 8, 20},
{'l', 3, 16},
};
static cdOperation char_151[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 1, 22},
{'l', 2, 21},
{'l', 3, 22},
{'l', 2, 23},
{'l', 1, 22},
{'l', 1, 20},
{'l', 6, 17},
};
static cdOperation char_152[] = {
{'m', 1, 14},
{'l', 7, 0},
{'l', 5, -4},
{'l', 3, -6},
{'l', 1, -7},
{'l', 0, -7},
{'m', 13, 14},
{'l', 7, 0},
{'m', 3, 19},
{'l', 2, 18},
{'l', 3, 17},
{'l', 4, 18},
{'l', 3, 19},
{'m', 11, 19},
{'l', 10, 18},
{'l', 11, 17},
{'l', 12, 18},
{'l', 11, 19},
};
static cdOperation char_153[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 4, 26},
{'l', 3, 25},
{'l', 4, 24},
{'l', 5, 25},
{'l', 4, 26},
{'m', 12, 26},
{'l', 11, 25},
{'l', 12, 24},
{'l', 13, 25},
{'l', 12, 26},
};
static cdOperation char_154[] = {
{'m', 0, 21},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 6, 0},
{'l', 8, 0},
{'l', 11, 1},
{'l', 13, 3},
{'l', 14, 6},
{'l', 14, 21},
{'m', 3, 26},
{'l', 2, 25},
{'l', 3, 24},
{'l', 4, 25},
{'l', 3, 26},
{'m', 11, 26},
{'l', 10, 25},
{'l', 11, 24},
{'l', 12, 25},
{'l', 11, 26},
};
static cdOperation char_155[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 0, -3},
{'l', 13, 17},
};
static cdOperation char_156[] = {
{'m', 13, 20},
{'l', 10, 21},
{'l', 8, 21},
{'l', 5, 20},
{'l', 4, 19},
{'l', 3, 16},
{'l', 3, 0},
{'l', 12, 0},
{'l', 15, 1},
{'l', 15, 2},
{'m', 0, 12},
{'l', 7, 12},
};
static cdOperation char_157[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 1, -3},
{'l', 2, -1},
{'l', 16, 23},
};
static cdOperation char_158[] = {
{'m', 0, 10},
{'l', 9, 10},
{'l', 12, 11},
{'l', 13, 12},
{'l', 14, 14},
{'l', 14, 17},
{'l', 13, 19},
{'l', 12, 20},
{'l', 9, 21},
{'l', 0, 21},
{'l', 0, 0},
{'m', 12, 8},
{'l', 18, 8},
{'m', 15, 12},
{'l', 15, 2},
{'l', 16, 0},
{'l', 18, 0},
{'l', 19, 1},
};
static cdOperation char_159[] = {
{'m', 1, -4},
{'l', 3, -5},
{'l', 6, -5},
{'l', 8, -4},
{'l', 10, -1},
{'l', 10, 15},
{'m', 6, 8},
{'l', 14, 8},
{'m', 10, 1},
{'l', 10, 17},
{'l', 12, 20},
{'l', 14, 21},
{'l', 17, 21},
{'l', 19, 20},
};
static cdOperation char_160[] = {
{'m', 12, 14},
{'l', 12, 0},
{'m', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'m', 10, 22},
{'l', 9, 21},
{'l', 8, 22},
{'l', 9, 23},
{'l', 10, 22},
{'l', 10, 20},
{'l', 5, 17},
};
static cdOperation char_161[] = {
{'m', 3, 14},
{'l', 3, 0},
{'m', 7, 22},
{'l', 6, 21},
{'l', 5, 22},
{'l', 6, 23},
{'l', 7, 22},
{'l', 7, 20},
{'l', 2, 17},
};
static cdOperation char_162[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 11, 22},
{'l', 10, 21},
{'l', 9, 22},
{'l', 10, 23},
{'l', 11, 22},
{'l', 11, 20},
{'l', 6, 17},
};
static cdOperation char_163[] = {
{'m', 0, 14},
{'l', 0, 4},
{'l', 1, 1},
{'l', 3, 0},
{'l', 6, 0},
{'l', 8, 1},
{'l', 11, 4},
{'m', 11, 14},
{'l', 11, 0},
{'m', 9, 22},
{'l', 8, 21},
{'l', 7, 22},
{'l', 8, 23},
{'l', 9, 22},
{'l', 9, 20},
{'l', 4, 17},
};
static cdOperation char_164[] = {
{'m', 0, 14},
{'l', 0, 0},
{'m', 0, 10},
{'l', 3, 13},
{'l', 5, 14},
{'l', 8, 14},
{'l', 10, 13},
{'l', 11, 10},
{'l', 11, 0},
{'m', 0, 17},
{'l', 5, 20},
{'l', 9, 17},
{'l', 13, 19},
};
static cdOperation char_165[] = {
{'m', 14, 21},
{'l', 14, 0},
{'l', 0, 21},
{'l', 0, 0},
{'m', 0, 24},
{'l', 5, 27},
{'l', 9, 24},
{'l', 13, 26},
};
static cdOperation char_166[] = {
{'m', 12, 21},
{'l', 12, 7},
{'m', 12, 18},
{'l', 10, 20},
{'l', 8, 21},
{'l', 5, 21},
{'l', 3, 20},
{'l', 1, 18},
{'l', 0, 15},
{'l', 0, 13},
{'l', 1, 10},
{'l', 3, 8},
{'l', 5, 7},
{'l', 8, 7},
{'l', 10, 8},
{'l', 12, 10},
{'m', 0, 0},
{'l', 12, 0},
};
static cdOperation char_167[] = {
{'m', 0, 15},
{'l', 1, 12},
{'l', 3, 10},
{'l', 5, 9},
{'l', 8, 9},
{'l', 10, 10},
{'l', 12, 12},
{'l', 13, 15},
{'l', 12, 18},
{'l', 10, 20},
{'l', 8, 21},
{'l', 5, 21},
{'l', 3, 20},
{'l', 1, 18},
{'l', 0, 15},
{'m', 0, 0},
{'l', 13, 0},
};
static cdOperation char_168[] = {
{'m', 12, 5},
{'l', 12, 4},
{'l', 11, 2},
{'l', 10, 1},
{'l', 8, 0},
{'l', 4, 0},
{'l', 2, 1},
{'l', 1, 2},
{'l', 0, 4},
{'l', 0, 6},
{'l', 1, 8},
{'l', 2, 9},
{'l', 6, 11},
{'l', 6, 14},
{'m', 6, 19},
{'l', 7, 20},
{'l', 6, 21},
{'l', 5, 20},
{'l', 6, 19},
};
static cdOperation char_169[] = {
{'m', 0, 0},
{'l', 0, 8},
{'l', 12, 8},
{'l', 12, 5},
{'l', 3, 5},
{'l', 3, 0},
{'l', 0, 0},
};
static cdOperation char_170[] = {
{'m', 12, 0},
{'l', 12, 8},
{'l', 0, 8},
{'l', 0, 5},
{'l', 9, 5},
{'l', 9, 0},
{'l', 12, 0},
};
static cdOperation char_171[] = {
{'m', 0, 18},
{'l', 3, 21},
{'l', 4, 21},
{'l', 4, 12},
{'m', 9, 6},
{'l', 9, 7},
{'l', 11, 9},
{'l', 15, 9},
{'l', 16, 7},
{'l', 16, 5},
{'l', 15, 4},
{'l', 9, 0},
{'l', 16, 0},
{'m', 15, 21},
{'l', 1, 0},
};
static cdOperation char_172[] = {
{'m', 0, 18},
{'l', 3, 21},
{'l', 4, 21},
{'l', 4, 12},
{'m', 15, 21},
{'l', 1, 0},
{'m', 15, 3},
{'l', 7, 3},
{'l', 13, 9},
{'l', 13, 0},
};
static cdOperation char_173[] = {
{'m', 1, 0},
{'l', 1, 14},
{'m', 1, 19},
{'l', 0, 20},
{'l', 1, 21},
{'l', 2, 20},
{'l', 1, 19},
};
static cdOperation char_174[] = {
{'m', 7, 17},
{'l', 0, 11},
{'l', 7, 5},
{'m', 15, 17},
{'l', 8, 11},
{'l', 15, 5},
};
static cdOperation char_175[] = {
{'m', 8, 17},
{'l', 15, 11},
{'l', 8, 5},
{'m', 0, 17},
{'l', 7, 11},
{'l', 0, 5},
};
static cdOperation char_176[] = {
{'m', 4, 21},
{'l', 6, 21},
{'l', 6, 19},
{'l', 4, 19},
{'l', 4, 21},
{'m', 5, 21},
{'l', 5, 19},
{'m', 4, 15},
{'l', 6, 15},
{'l', 6, 13},
{'l', 4, 13},
{'l', 4, 15},
{'m', 5, 15},
{'l', 5, 13},
{'m', 4, 9},
{'l', 6, 9},
{'l', 6, 7},
{'l', 4, 7},
{'l', 4, 9},
{'m', 5, 9},
{'l', 5, 7},
{'m', 4, 3},
{'l', 6, 3},
{'l', 6, 1},
{'l', 4, 1},
{'l', 4, 3},
{'m', 5, 3},
{'l', 5, 1},
{'m', 0, 18},
{'l', 2, 18},
{'l', 2, 16},
{'l', 0, 16},
{'l', 0, 18},
{'m', 1, 18},
{'l', 1, 16},
{'m', 0, 12},
{'l', 2, 12},
{'l', 2, 10},
{'l', 0, 10},
{'l', 0, 12},
{'m', 1, 12},
{'l', 1, 10},
{'m', 0, 6},
{'l', 2, 6},
{'l', 2, 4},
{'l', 0, 4},
{'l', 0, 6},
{'m', 1, 6},
{'l', 1, 4},
{'m', 0, 0},
{'l', 2, 0},
{'l', 2, -2},
{'l', 0, -2},
{'l', 0, 0},
{'m', 1, 0},
{'l', 1, -2},
{'m', 8, 18},
{'l', 10, 18},
{'l', 10, 16},
{'l', 8, 16},
{'l', 8, 18},
{'m', 9, 18},
{'l', 9, 16},
{'m', 8, 12},
{'l', 10, 12},
{'l', 10, 10},
{'l', 8, 10},
{'l', 8, 12},
{'m', 9, 12},
{'l', 9, 10},
{'m', 8, 6},
{'l', 10, 6},
{'l', 10, 4},
{'l', 8, 4},
{'l', 8, 6},
{'m', 9, 6},
{'l', 9, 4},
{'m', 8, 0},
{'l', 10, 0},
{'l', 10, -2},
{'l', 8, -2},
{'l', 8, 0},
{'m', 9, 0},
{'l', 9, -2},
{'m', 12, 21},
{'l', 14, 21},
{'l', 14, 19},
{'l', 12, 19},
{'l', 12, 21},
{'m', 13, 21},
{'l', 13, 19},
{'m', 12, 15},
{'l', 14, 15},
{'l', 14, 13},
{'l', 12, 13},
{'l', 12, 15},
{'m', 13, 15},
{'l', 13, 13},
{'m', 12, 9},
{'l', 14, 9},
{'l', 14, 7},
{'l', 12, 7},
{'l', 12, 9},
{'m', 13, 9},
{'l', 13, 7},
{'m', 12, 3},
{'l', 14, 3},
{'l', 14, 1},
{'l', 12, 1},
{'l', 12, 3},
{'m', 13, 3},
{'l', 13, 1},
{'m', 3, -3},
{'l', 3, -5},
{'l', 5, -5},
{'l', 5, -3},
{'l', 3, -3},
{'m', 4, -3},
{'l', 4, -5},
{'m', 12, -3},
{'l', 12, -5},
{'l', 14, -5},
{'l', 14, -3},
{'l', 12, -3},
{'m', 13, -3},
{'l', 13, -5},
};
static cdOperation char_177[] = {
{'m', 0, 18},
{'l', 2, 18},
{'l', 2, 16},
{'l', 0, 16},
{'l', 0, 18},
{'m', 1, 18},
{'l', 1, 16},
{'m', 0, 12},
{'l', 2, 12},
{'l', 2, 10},
{'l', 0, 10},
{'l', 0, 12},
{'m', 1, 12},
{'l', 1, 10},
{'m', 0, 6},
{'l', 2, 6},
{'l', 2, 4},
{'l', 0, 4},
{'l', 0, 6},
{'m', 1, 6},
{'l', 1, 4},
{'m', 0, 0},
{'l', 2, 0},
{'l', 2, -2},
{'l', 0, -2},
{'l', 0, 0},
{'m', 1, 0},
{'l', 1, -2},
{'m', 2, 21},
{'l', 4, 21},
{'l', 4, 19},
{'l', 2, 19},
{'l', 2, 21},
{'m', 3, 21},
{'l', 3, 19},
{'m', 2, 15},
{'l', 4, 15},
{'l', 4, 13},
{'l', 2, 13},
{'l', 2, 15},
{'m', 3, 15},
{'l', 3, 13},
{'m', 2, 9},
{'l', 4, 9},
{'l', 4, 7},
{'l', 2, 7},
{'l', 2, 9},
{'m', 3, 9},
{'l', 3, 7},
{'m', 2, 3},
{'l', 4, 3},
{'l', 4, 1},
{'l', 2, 1},
{'l', 2, 3},
{'m', 3, 3},
{'l', 3, 1},
{'m', 4, 18},
{'l', 6, 18},
{'l', 6, 16},
{'l', 4, 16},
{'l', 4, 18},
{'m', 5, 18},
{'l', 5, 16},
{'m', 4, 12},
{'l', 6, 12},
{'l', 6, 10},
{'l', 4, 10},
{'l', 4, 12},
{'m', 5, 12},
{'l', 5, 10},
{'m', 4, 6},
{'l', 6, 6},
{'l', 6, 4},
{'l', 4, 4},
{'l', 4, 6},
{'m', 5, 6},
{'l', 5, 4},
{'m', 4, 0},
{'l', 6, 0},
{'l', 6, -2},
{'l', 4, -2},
{'l', 4, 0},
{'m', 5, 0},
{'l', 5, -2},
{'m', 6, 21},
{'l', 8, 21},
{'l', 8, 19},
{'l', 6, 19},
{'l', 6, 21},
{'m', 7, 21},
{'l', 7, 19},
{'m', 6, 15},
{'l', 8, 15},
{'l', 8, 13},
{'l', 6, 13},
{'l', 6, 15},
{'m', 7, 15},
{'l', 7, 13},
{'m', 6, 9},
{'l', 8, 9},
{'l', 8, 7},
{'l', 6, 7},
{'l', 6, 9},
{'m', 7, 9},
{'l', 7, 7},
{'m', 6, 3},
{'l', 8, 3},
{'l', 8, 1},
{'l', 6, 1},
{'l', 6, 3},
{'m', 7, 3},
{'l', 7, 1},
{'m', 8, 18},
{'l', 10, 18},
{'l', 10, 16},
{'l', 8, 16},
{'l', 8, 18},
{'m', 9, 18},
{'l', 9, 16},
{'m', 8, 12},
{'l', 10, 12},
{'l', 10, 10},
{'l', 8, 10},
{'l', 8, 12},
{'m', 9, 12},
{'l', 9, 10},
{'m', 8, 6},
{'l', 10, 6},
{'l', 10, 4},
{'l', 8, 4},
{'l', 8, 6},
{'m', 9, 6},
{'l', 9, 4},
{'m', 8, 0},
{'l', 10, 0},
{'l', 10, -2},
{'l', 8, -2},
{'l', 8, 0},
{'m', 9, 0},
{'l', 9, -2},
{'m', 10, 21},
{'l', 12, 21},
{'l', 12, 19},
{'l', 10, 19},
{'l', 10, 21},
{'m', 11, 21},
{'l', 11, 19},
{'m', 10, 15},
{'l', 12, 15},
{'l', 12, 13},
{'l', 10, 13},
{'l', 10, 15},
{'m', 11, 15},
{'l', 11, 13},
{'m', 10, 9},
{'l', 12, 9},
{'l', 12, 7},
{'l', 10, 7},
{'l', 10, 9},
{'m', 11, 9},
{'l', 11, 7},
{'m', 10, 3},
{'l', 12, 3},
{'l', 12, 1},
{'l', 10, 1},
{'l', 10, 3},
{'m', 11, 3},
{'l', 11, 1},
{'m', 12, 18},
{'l', 14, 18},
{'l', 14, 16},
{'l', 12, 16},
{'l', 12, 18},
{'m', 13, 18},
{'l', 13, 16},
{'m', 12, 12},
{'l', 14, 12},
{'l', 14, 10},
{'l', 12, 10},
{'l', 12, 12},
{'m', 13, 12},
{'l', 13, 10},
{'m', 12, 6},
{'l', 14, 6},
{'l', 14, 4},
{'l', 12, 4},
{'l', 12, 6},
{'m', 13, 6},
{'l', 13, 4},
{'m', 12, 0},
{'l', 14, 0},
{'l', 14, -2},
{'l', 12, -2},
{'l', 12, 0},
{'m', 13, 0},
{'l', 13, -2},
{'m', 14, 21},
{'l', 16, 21},
{'l', 16, 19},
{'l', 14, 19},
{'l', 14, 21},
{'m', 15, 21},
{'l', 15, 19},
{'m', 14, 15},
{'l', 16, 15},
{'l', 16, 13},
{'l', 14, 13},
{'l', 14, 15},
{'m', 15, 15},
{'l', 15, 13},
{'m', 14, 9},
{'l', 16, 9},
{'l', 16, 7},
{'l', 14, 7},
{'l', 14, 9},
{'m', 15, 9},
{'l', 15, 7},
{'m', 14, 3},
{'l', 16, 3},
{'l', 16, 1},
{'l', 14, 1},
{'l', 14, 3},
{'m', 15, 3},
{'l', 15, 1},
{'m', 2, -3},
{'l', 2, -5},
{'l', 4, -5},
{'l', 4, -3},
{'l', 2, -3},
{'m', 3, -3},
{'l', 3, -5},
{'m', 6, -3},
{'l', 6, -5},
{'l', 8, -5},
{'l', 8, -3},
{'l', 6, -3},
{'m', 7, -3},
{'l', 7, -5},
{'m', 10, -3},
{'l', 10, -5},
{'l', 12, -5},
{'l', 12, -3},
{'l', 10, -3},
{'m', 11, -3},
{'l', 11, -5},
{'m', 14, -3},
{'l', 14, -5},
{'l', 16, -5},
{'l', 16, -3},
{'l', 14, -3},
{'m', 15, -3},
{'l', 15, -5},
};
static cdOperation char_178[] = {
{'m', 0, 21},
{'l', 2, 21},
{'l', 2, 19},
{'l', 0, 19},
{'l', 0, 21},
{'m', 1, 21},
{'l', 1, 19},
{'m', 2, 21},
{'l', 4, 21},
{'l', 4, 19},
{'l', 2, 19},
{'l', 2, 21},
{'m', 3, 21},
{'l', 3, 19},
{'m', 10, 21},
{'l', 12, 21},
{'l', 12, 19},
{'l', 10, 19},
{'l', 10, 21},
{'m', 11, 21},
{'l', 11, 19},
{'m', 12, 21},
{'l', 14, 21},
{'l', 14, 19},
{'l', 12, 19},
{'l', 12, 21},
{'m', 13, 21},
{'l', 13, 19},
{'m', 20, 21},
{'l', 22, 21},
{'l', 22, 19},
{'l', 20, 19},
{'l', 20, 21},
{'m', 21, 21},
{'l', 21, 19},
{'m', 22, 21},
{'l', 24, 21},
{'l', 24, 19},
{'l', 22, 19},
{'l', 22, 21},
{'m', 23, 21},
{'l', 23, 19},
{'m', 4, 17},
{'l', 6, 17},
{'l', 6, 15},
{'l', 4, 15},
{'l', 4, 17},
{'m', 5, 17},
{'l', 5, 15},
{'m', 6, 17},
{'l', 8, 17},
{'l', 8, 15},
{'l', 6, 15},
{'l', 6, 17},
{'m', 7, 17},
{'l', 7, 15},
{'m', 8, 17},
{'l', 10, 17},
{'l', 10, 15},
{'l', 8, 15},
{'l', 8, 17},
{'m', 9, 17},
{'l', 9, 15},
{'m', 0, 13},
{'l', 2, 13},
{'l', 2, 11},
{'l', 0, 11},
{'l', 0, 13},
{'m', 1, 13},
{'l', 1, 11},
{'m', 2, 13},
{'l', 4, 13},
{'l', 4, 11},
{'l', 2, 11},
{'l', 2, 13},
{'m', 3, 13},
{'l', 3, 11},
{'m', 10, 13},
{'l', 12, 13},
{'l', 12, 11},
{'l', 10, 11},
{'l', 10, 13},
{'m', 11, 13},
{'l', 11, 11},
{'m', 12, 13},
{'l', 14, 13},
{'l', 14, 11},
{'l', 12, 11},
{'l', 12, 13},
{'m', 13, 13},
{'l', 13, 11},
{'m', 20, 13},
{'l', 22, 13},
{'l', 22, 11},
{'l', 20, 11},
{'l', 20, 13},
{'m', 21, 13},
{'l', 21, 11},
{'m', 22, 13},
{'l', 24, 13},
{'l', 24, 11},
{'l', 22, 11},
{'l', 22, 13},
{'m', 23, 13},
{'l', 23, 11},
{'m', 14, 9},
{'l', 16, 9},
{'l', 16, 7},
{'l', 14, 7},
{'l', 14, 9},
{'m', 15, 9},
{'l', 15, 7},
{'m', 16, 9},
{'l', 18, 9},
{'l', 18, 7},
{'l', 16, 7},
{'l', 16, 9},
{'m', 17, 9},
{'l', 17, 7},
{'m', 18, 9},
{'l', 20, 9},
{'l', 20, 7},
{'l', 18, 7},
{'l', 18, 9},
{'m', 19, 9},
{'l', 19, 7},
{'m', 0, 5},
{'l', 2, 5},
{'l', 2, 3},
{'l', 0, 3},
{'l', 0, 5},
{'m', 1, 5},
{'l', 1, 3},
{'m', 2, 5},
{'l', 4, 5},
{'l', 4, 3},
{'l', 2, 3},
{'l', 2, 5},
{'m', 3, 5},
{'l', 3, 3},
{'m', 10, 5},
{'l', 12, 5},
{'l', 12, 3},
{'l', 10, 3},
{'l', 10, 5},
{'m', 11, 5},
{'l', 11, 3},
{'m', 12, 5},
{'l', 14, 5},
{'l', 14, 3},
{'l', 12, 3},
{'l', 12, 5},
{'m', 13, 5},
{'l', 13, 3},
{'m', 20, 5},
{'l', 22, 5},
{'l', 22, 3},
{'l', 20, 3},
{'l', 20, 5},
{'m', 21, 5},
{'l', 21, 3},
{'m', 22, 5},
{'l', 24, 5},
{'l', 24, 3},
{'l', 22, 3},
{'l', 22, 5},
{'m', 23, 5},
{'l', 23, 3},
{'m', 4, 1},
{'l', 10, 1},
{'l', 10, -1},
{'l', 4, -1},
{'l', 4, 1},
{'m', 5, 1},
{'l', 5, -1},
{'m', 7, 1},
{'l', 7, -1},
{'m', 9, 1},
{'l', 9, -1},
{'m', 0, -3},
{'l', 2, -3},
{'l', 2, -5},
{'l', 0, -5},
{'l', 0, -3},
{'m', 1, -3},
{'l', 1, -5},
{'m', 2, -3},
{'l', 4, -3},
{'l', 4, -5},
{'l', 2, -5},
{'l', 2, -3},
{'m', 3, -3},
{'l', 3, -5},
{'m', 10, -3},
{'l', 14, -3},
{'l', 14, -5},
{'l', 10, -5},
{'l', 10, -3},
{'m', 11, -3},
{'l', 11, -5},
{'m', 13, -3},
{'l', 13, -5},
{'m', 20, -3},
{'l', 24, -3},
{'l', 24, -5},
{'l', 20, -5},
{'l', 20, -3},
{'m', 21, -3},
{'l', 21, -5},
{'m', 23, -3},
{'l', 23, -5},
{'m', 8, 1},
{'l', 8, -1},
{'m', 6, 1},
{'l', 6, -1},
{'m', 12, -3},
{'l', 12, -5},
{'m', 22, -3},
{'l', 22, -5},
{'m', 18, 17},
{'l', 20, 17},
{'l', 20, 15},
{'l', 18, 15},
{'l', 18, 17},
{'m', 19, 17},
{'l', 19, 15},
{'m', 20, 17},
{'l', 22, 17},
{'l', 22, 15},
{'l', 20, 15},
{'l', 20, 17},
{'m', 21, 17},
{'l', 21, 15},
{'m', 22, 17},
{'l', 24, 17},
{'l', 24, 15},
{'l', 22, 15},
{'l', 22, 17},
{'m', 23, 17},
{'l', 23, 15},
{'m', 0, 9},
{'l', 2, 9},
{'l', 2, 7},
{'l', 0, 7},
{'l', 0, 9},
{'m', 1, 9},
{'l', 1, 7},
{'m', 2, 9},
{'l', 4, 9},
{'l', 4, 7},
{'l', 2, 7},
{'l', 2, 9},
{'m', 3, 9},
{'l', 3, 7},
{'m', 4, 9},
{'l', 6, 9},
{'l', 6, 7},
{'l', 4, 7},
{'l', 4, 9},
{'m', 5, 9},
{'l', 5, 7},
{'m', 18, 1},
{'l', 24, 1},
{'l', 24, -1},
{'l', 18, -1},
{'l', 18, 1},
{'m', 19, 1},
{'l', 19, -1},
{'m', 21, 1},
{'l', 21, -1},
{'m', 23, 1},
{'l', 23, -1},
{'m', 20, 1},
{'l', 20, -1},
{'m', 22, 1},
{'l', 22, -1},
};
static cdOperation char_179[] = {
{'m', 0, 21},
{'l', 0, -7},
};
static cdOperation char_180[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation char_181[] = {
{'m', 8, -7},
{'l', 8, 21},
{'m', 0, 9},
{'l', 8, 9},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation char_182[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
{'m', 16, 21},
{'l', 16, -7},
};
static cdOperation char_183[] = {
{'m', 0, 5},
{'l', 16, 5},
{'l', 16, -7},
{'m', 8, 5},
{'l', 8, -7},
};
static cdOperation char_184[] = {
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, -7},
{'m', 0, 5},
{'l', 8, 5},
};
static cdOperation char_185[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, 21},
{'l', 16, -7},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 0, 1},
{'l', 0, 1},
};
static cdOperation char_186[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 16, 21},
{'l', 16, -7},
};
static cdOperation char_187[] = {
{'m', 0, 9},
{'l', 16, 9},
{'l', 16, -7},
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation char_188[] = {
{'m', 0, 5},
{'l', 16, 5},
{'l', 16, 21},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
};
static cdOperation char_189[] = {
{'m', 0, 9},
{'l', 16, 9},
{'l', 16, 21},
{'m', 8, 9},
{'l', 8, 21},
};
static cdOperation char_190[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, 21},
{'m', 0, 9},
{'l', 8, 9},
};
static cdOperation char_191[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation char_192[] = {
{'m', 8, 9},
{'l', 0, 9},
{'l', 0, 21},
};
static cdOperation char_193[] = {
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 16, 9},
{'l', 8, 9},
};
static cdOperation char_194[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, 5},
{'l', 8, 5},
};
static cdOperation char_195[] = {
{'m', 0, 21},
{'l', 0, -7},
{'m', 8, 5},
{'l', 0, 5},
};
static cdOperation char_196[] = {
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation char_197[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation char_198[] = {
{'m', 0, -7},
{'l', 0, 21},
{'m', 8, 9},
{'l', 0, 9},
{'m', 8, 5},
{'l', 0, 5},
};
static cdOperation char_199[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 16, 5},
{'l', 8, 5},
{'m', 0, 21},
{'l', 0, -7},
};
static cdOperation char_200[] = {
{'m', 16, 5},
{'l', 0, 5},
{'l', 0, 21},
{'m', 16, 9},
{'l', 8, 9},
{'l', 8, 21},
};
static cdOperation char_201[] = {
{'m', 16, 9},
{'l', 0, 9},
{'l', 0, -7},
{'m', 16, 5},
{'l', 8, 5},
{'l', 8, -7},
};
static cdOperation char_202[] = {
{'m', 0, 5},
{'l', 24, 5},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 16, 21},
{'l', 16, 9},
{'l', 24, 9},
};
static cdOperation char_203[] = {
{'m', 0, 9},
{'l', 24, 9},
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, -7},
{'l', 16, 5},
{'l', 24, 5},
};
static cdOperation char_204[] = {
{'m', 16, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 0, 21},
{'l', 0, -7},
{'m', 16, 9},
{'l', 8, 9},
{'l', 8, 21},
};
static cdOperation char_205[] = {
{'m', 0, 9},
{'l', 16, 9},
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation char_206[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 16, 21},
{'l', 16, 9},
{'l', 24, 9},
{'m', 16, -7},
{'l', 16, 5},
{'l', 24, 5},
};
static cdOperation char_207[] = {
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
{'m', 16, 9},
{'l', 8, 9},
{'m', 0, 5},
{'l', 16, 5},
};
static cdOperation char_208[] = {
{'m', 0, 9},
{'l', 16, 9},
{'m', 6, 21},
{'l', 6, 9},
{'m', 14, 21},
{'l', 14, 9},
};
static cdOperation char_209[] = {
{'m', 0, 5},
{'l', 8, 5},
{'l', 8, -7},
{'m', 16, 5},
{'l', 8, 5},
{'m', 0, 9},
{'l', 16, 9},
};
static cdOperation char_210[] = {
{'m', 0, 5},
{'l', 16, 5},
{'m', 6, -7},
{'l', 6, 5},
{'m', 14, -7},
{'l', 14, 5},
};
static cdOperation char_211[] = {
{'m', 16, 9},
{'l', 0, 9},
{'l', 0, 21},
{'m', 8, 9},
{'l', 8, 21},
};
static cdOperation char_212[] = {
{'m', 8, 5},
{'l', 0, 5},
{'l', 0, 21},
{'m', 8, 9},
{'l', 0, 9},
};
static cdOperation char_213[] = {
{'m', 8, 9},
{'l', 0, 9},
{'l', 0, -7},
{'m', 8, 5},
{'l', 0, 5},
};
static cdOperation char_214[] = {
{'m', 16, 5},
{'l', 0, 5},
{'l', 0, -7},
{'m', 8, 5},
{'l', 8, -7},
};
static cdOperation char_215[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 24, 5},
{'m', 16, 21},
{'l', 16, -7},
};
static cdOperation char_216[] = {
{'m', 8, 21},
{'l', 8, -7},
{'m', 0, 5},
{'l', 16, 5},
{'m', 0, 9},
{'l', 16, 9},
};
static cdOperation char_217[] = {
{'m', 0, 9},
{'l', 8, 9},
{'l', 8, 21},
};
static cdOperation char_218[] = {
{'m', 8, 5},
{'l', 0, 5},
{'l', 0, -7},
};
static cdOperation char_219[] = {
{'m', 16, 0},
{'l', 0, 0},
{'l', 0, 21},
{'l', 15, 21},
{'l', 15, 0},
{'l', 16, 0},
{'l', 16, 21},
{'l', 15, 21},
{'l', 15, 0},
{'m', 1, 21},
{'l', 1, 0},
{'m', 2, 21},
{'l', 2, 0},
{'m', 3, 21},
{'l', 3, 0},
{'m', 4, 21},
{'l', 4, 0},
{'m', 5, 21},
{'l', 5, 0},
{'m', 6, 21},
{'l', 6, 0},
{'m', 7, 21},
{'l', 7, 0},
{'m', 8, 21},
{'l', 8, 0},
{'m', 9, 21},
{'l', 9, 0},
{'m', 10, 21},
{'l', 10, 0},
{'m', 11, 21},
{'l', 11, 0},
{'m', 12, 21},
{'l', 12, 0},
{'m', 13, 21},
{'l', 13, 0},
{'m', 14, 21},
{'l', 14, 0},
{'m', 0, 11},
{'l', 16, 11},
};
static cdOperation char_220[] = {
{'m', 16, 0},
{'l', 0, 0},
{'l', 0, 11},
{'l', 16, 11},
{'l', 16, 0},
{'l', 15, 0},
{'l', 15, 11},
{'m', 1, 11},
{'l', 1, 0},
{'m', 2, 11},
{'l', 2, 0},
{'m', 3, 11},
{'l', 3, 0},
{'m', 4, 11},
{'l', 4, 0},
{'m', 5, 11},
{'l', 5, 0},
{'m', 6, 11},
{'l', 6, 0},
{'m', 7, 11},
{'l', 7, 0},
{'m', 8, 11},
{'l', 8, 0},
{'m', 9, 11},
{'l', 9, 0},
{'m', 10, 11},
{'l', 10, 0},
{'m', 11, 11},
{'l', 11, 0},
{'m', 12, 11},
{'l', 12, 0},
{'m', 13, 11},
{'l', 13, 0},
{'m', 14, 11},
{'l', 14, 0},
};
static cdOperation char_221[] = {
{'m', 0, 0},
{'l', 0, 21},
{'l', 8, 21},
{'l', 8, 0},
{'l', 0, 0},
{'m', 1, 21},
{'l', 1, 0},
{'m', 2, 21},
{'l', 2, 0},
{'m', 3, 21},
{'l', 3, 0},
{'m', 4, 21},
{'l', 4, 0},
{'m', 5, 21},
{'l', 5, 0},
{'m', 6, 21},
{'l', 6, 0},
{'m', 7, 21},
{'l', 7, 0},
};
static cdOperation char_222[] = {
{'m', 9, 0},
{'l', 9, 21},
{'m', 10, 21},
{'l', 10, 0},
{'m', 11, 21},
{'l', 11, 0},
{'m', 12, 21},
{'l', 12, 0},
{'m', 13, 21},
{'l', 13, 0},
{'m', 14, 21},
{'l', 14, 0},
{'m', 15, 21},
{'l', 15, 0},
{'m', 16, 21},
{'l', 16, 0},
{'m', 17, 21},
{'l', 17, 0},
};
static cdOperation char_223[] = {
{'m', 16, 10},
{'l', 0, 10},
{'l', 0, 21},
{'l', 16, 21},
{'l', 16, 10},
{'l', 15, 10},
{'l', 15, 21},
{'m', 1, 21},
{'l', 1, 10},
{'m', 2, 21},
{'l', 2, 10},
{'m', 3, 21},
{'l', 3, 10},
{'m', 4, 21},
{'l', 4, 10},
{'m', 5, 21},
{'l', 5, 10},
{'m', 6, 21},
{'l', 6, 10},
{'m', 7, 21},
{'l', 7, 10},
{'m', 8, 21},
{'l', 8, 10},
{'m', 9, 21},
{'l', 9, 10},
{'m', 10, 21},
{'l', 10, 10},
{'m', 11, 21},
{'l', 11, 10},
{'m', 12, 21},
{'l', 12, 10},
{'m', 13, 21},
{'l', 13, 10},
{'m', 14, 21},
{'l', 14, 10},
};
static cdOperation char_224[] = {
{'m', 18, 0},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 18, 12},
};
static cdOperation char_225[] = {
{'m', 0, 1},
{'l', 10, 1},
{'l', 13, 3},
{'l', 13, 7},
{'l', 9, 9},
{'l', 13, 11},
{'l', 13, 14},
{'l', 10, 16},
{'l', 3, 16},
{'l', 0, 14},
{'l', 0, -3},
{'m', 9, 9},
{'l', 0, 9},
};
static cdOperation char_226[] = {
{'m', 0, 0},
{'l', 0, 14},
{'l', 9, 14},
{'l', 9, 11},
};
static cdOperation char_227[] = {
{'m', 3, 13},
{'l', 3, 0},
{'m', 11, 13},
{'l', 11, 0},
{'m', 0, 13},
{'l', 13, 13},
};
static cdOperation char_228[] = {
{'m', 13, 2},
{'l', 13, 0},
{'l', 0, 0},
{'l', 8, 11},
{'l', 0, 21},
{'l', 13, 21},
{'l', 13, 19},
};
static cdOperation char_229[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 5, 12},
{'l', 9, 14},
{'l', 20, 14},
};
static cdOperation char_230[] = {
{'m', 2, 14},
{'l', 2, 4},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 13, 4},
{'m', 13, 14},
{'l', 13, 0},
{'m', 3, 1},
{'l', 3, -3},
{'l', 0, -6},
};
static cdOperation char_231[] = {
{'m', 0, 9},
{'l', 0, 11},
{'l', 1, 13},
{'l', 3, 14},
{'l', 6, 14},
{'l', 8, 12},
{'l', 8, -2},
{'m', 8, 9},
{'l', 11, 11},
{'l', 14, 14},
};
static cdOperation char_232[] = {
{'m', 0, 9},
{'l', 1, 6},
{'l', 3, 4},
{'l', 5, 3},
{'l', 8, 3},
{'l', 10, 4},
{'l', 12, 6},
{'l', 13, 9},
{'l', 12, 12},
{'l', 10, 14},
{'l', 8, 15},
{'l', 5, 15},
{'l', 3, 14},
{'l', 1, 12},
{'l', 0, 9},
{'m', 6, 21},
{'l', 6, 15},
{'m', 7, 21},
{'l', 7, 15},
{'m', 0, 21},
{'l', 13, 21},
{'m', 6, -3},
{'l', 6, 3},
{'m', 7, -3},
{'l', 7, 3},
{'m', 0, -3},
{'l', 13, -3},
};
static cdOperation char_233[] = {
{'m', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 8},
{'l', 1, 5},
{'l', 2, 3},
{'l', 4, 1},
{'l', 6, 0},
{'l', 10, 0},
{'l', 12, 1},
{'l', 14, 3},
{'l', 15, 5},
{'l', 16, 8},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'m', 0, 10},
{'l', 16, 10},
};
static cdOperation char_234[] = {
{'m', 16, 0},
{'l', 11, 0},
{'l', 11, 6},
{'l', 14, 7},
{'l', 16, 9},
{'l', 16, 13},
{'l', 15, 16},
{'l', 14, 18},
{'l', 12, 20},
{'l', 10, 21},
{'l', 6, 21},
{'l', 4, 20},
{'l', 2, 18},
{'l', 1, 16},
{'l', 0, 13},
{'l', 0, 9},
{'l', 2, 7},
{'l', 5, 6},
{'l', 5, 0},
{'l', 0, 0},
};
static cdOperation char_235[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 10, 11},
{'l', 0, 21},
{'l', 13, 21},
{'l', 13, 18},
};
static cdOperation char_236[] = {
{'m', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 12, 9},
{'l', 10, 11},
{'l', 8, 12},
{'l', 5, 12},
{'l', 3, 11},
{'l', 1, 9},
{'l', 0, 6},
{'m', 12, 6},
{'l', 13, 3},
{'l', 15, 1},
{'l', 17, 0},
{'l', 20, 0},
{'l', 22, 1},
{'l', 24, 3},
{'l', 25, 6},
{'l', 24, 9},
{'l', 22, 11},
{'l', 20, 12},
{'l', 17, 12},
{'l', 15, 11},
{'l', 13, 9},
{'l', 12, 6},
};
static cdOperation char_237[] = {
{'m', 5, 14},
{'l', 3, 13},
{'l', 1, 11},
{'l', 0, 8},
{'l', 0, 6},
{'l', 1, 3},
{'l', 3, 1},
{'l', 5, 0},
{'l', 8, 0},
{'l', 10, 1},
{'l', 12, 3},
{'l', 13, 6},
{'l', 13, 8},
{'l', 12, 11},
{'l', 10, 13},
{'l', 8, 14},
{'l', 5, 14},
{'m', 0, -3},
{'l', 13, 17},
};
static cdOperation char_238[] = {
{'m', 13, 21},
{'l', 3, 21},
{'l', 0, 19},
{'l', 0, 11},
{'l', 8, 11},
{'m', 0, 11},
{'l', 0, 2},
{'l', 3, 0},
{'l', 13, 0},
};
static cdOperation char_239[] = {
{'m', 0, 0},
{'l', 0, 15},
{'l', 1, 18},
{'l', 3, 20},
{'l', 6, 21},
{'l', 8, 21},
{'l', 11, 20},
{'l', 13, 18},
{'l', 14, 15},
{'l', 14, 0},
};
static cdOperation char_240[] = {
{'m', 0, 9},
{'l', 18, 9},
{'m', 0, 5},
{'l', 18, 5},
{'m', 0, 13},
{'l', 18, 13},
};
static cdOperation char_241[] = {
{'m', 0, 0},
{'l', 18, 0},
{'m', 9, 21},
{'l', 9, 3},
{'m', 0, 12},
{'l', 18, 12},
};
static cdOperation char_242[] = {
{'m', 0, 0},
{'l', 18, 0},
{'m', 0, 21},
{'l', 18, 12},
{'l', 0, 3},
};
static cdOperation char_243[] = {
{'m', 18, 0},
{'l', 0, 0},
{'m', 18, 21},
{'l', 0, 12},
{'l', 18, 3},
};
static cdOperation char_244[] = {
{'m', 10, 20},
{'l', 7, 21},
{'l', 5, 21},
{'l', 2, 20},
{'l', 1, 19},
{'l', 0, 16},
{'l', 0, -7},
};
static cdOperation char_245[] = {
{'m', 0, -6},
{'l', 3, -7},
{'l', 5, -7},
{'l', 8, -6},
{'l', 9, -5},
{'l', 10, -2},
{'l', 10, 21},
};
static cdOperation char_246[] = {
{'m', 9, 20},
{'l', 8, 19},
{'l', 9, 18},
{'l', 10, 19},
{'l', 9, 20},
{'m', 9, 3},
{'l', 8, 2},
{'l', 9, 1},
{'l', 10, 2},
{'l', 9, 3},
{'m', 0, 10},
{'l', 18, 10},
};
static cdOperation char_247[] = {
{'m', 0, 11},
{'l', 5, 14},
{'l', 9, 11},
{'l', 13, 13},
{'m', 0, 6},
{'l', 5, 9},
{'l', 9, 6},
{'l', 13, 8},
};
static cdOperation char_248[] = {
{'m', 0, 15},
{'l', 1, 12},
{'l', 3, 10},
{'l', 5, 9},
{'l', 8, 9},
{'l', 10, 10},
{'l', 12, 12},
{'l', 13, 15},
{'l', 12, 18},
{'l', 10, 20},
{'l', 8, 21},
{'l', 5, 21},
{'l', 3, 20},
{'l', 1, 18},
{'l', 0, 15},
{'m', -1, 1},
{'l', -1, 1},
};
static cdOperation char_249[] = {
{'m', 0, 4},
{'l', 3, 4},
{'l', 3, 0},
{'l', 0, 0},
{'l', 0, 4},
{'m', 1, 4},
{'l', 1, 0},
{'m', 2, 4},
{'l', 2, 0},
};
static cdOperation char_250[] = {
{'m', 0, 2},
{'l', 3, 2},
{'l', 3, 0},
{'l', 0, 0},
{'l', 0, 2},
{'l', 3, 1},
{'m', 1, 2},
{'l', 1, 0},
{'m', 2, 2},
{'l', 2, 0},
};
static cdOperation char_251[] = {
{'m', 16, 18},
{'l', 16, 21},
{'l', 8, 21},
{'l', 8, 0},
{'l', 0, 10},
};
static cdOperation char_252[] = {
{'m', 0, 21},
{'l', 0, 10},
{'m', 0, 17},
{'l', 3, 20},
{'l', 5, 21},
{'l', 8, 21},
{'l', 10, 20},
{'l', 11, 17},
{'l', 11, 10},
};
static cdOperation char_253[] = {
{'m', 1, 19},
{'l', 1, 20},
{'l', 2, 21},
{'l', 6, 21},
{'l', 7, 20},
{'l', 7, 19},
{'l', 6, 18},
{'l', 0, 15},
{'l', 7, 15},
};
static cdOperation char_254[] = {
{'m', 0, 0},
{'l', 0, 11},
{'l', 8, 11},
{'l', 8, 0},
{'l', 0, 0},
{'m', 1, 11},
{'l', 1, 0},
{'m', 2, 11},
{'l', 2, 0},
{'m', 3, 11},
{'l', 3, 0},
{'m', 4, 11},
{'l', 4, 0},
{'m', 5, 11},
{'l', 5, 0},
{'m', 6, 11},
{'l', 6, 0},
{'m', 7, 11},
{'l', 7, 0},
};
static cdCaracter default_chars[256] = {
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{12, 6, 0, 0},
{6, 3, 7, char_33},
{14, 7, 16, char_34},
{18, 9, 8, char_35},
{17, 8, 38, char_36},
{21, 10, 29, char_37},
{22, 11, 46, char_38},
{6, 3, 7, char_39},
{10, 5, 18, char_40},
{11, 5, 18, char_41},
{13, 6, 6, char_42},
{22, 11, 4, char_43},
{6, 3, 8, char_44},
{22, 11, 2, char_45},
{6, 3, 5, char_46},
{14, 7, 2, char_47},
{17, 8, 17, char_48},
{14, 7, 4, char_49},
{17, 8, 14, char_50},
{17, 8, 15, char_51},
{17, 8, 5, char_52},
{17, 8, 17, char_53},
{16, 8, 23, char_54},
{17, 8, 4, char_55},
{17, 8, 29, char_56},
{17, 8, 23, char_57},
{6, 3, 10, char_58},
{6, 3, 13, char_59},
{20, 10, 3, char_60},
{22, 11, 4, char_61},
{20, 10, 3, char_62},
{15, 7, 19, char_63},
{24, 12, 52, char_64},
{19, 9, 5, char_65},
{17, 8, 21, char_66},
{19, 9, 18, char_67},
{17, 8, 14, char_68},
{15, 7, 6, char_69},
{14, 7, 6, char_70},
{18, 9, 21, char_71},
{18, 9, 6, char_72},
{4, 2, 2, char_73},
{14, 7, 10, char_74},
{17, 8, 6, char_75},
{13, 6, 4, char_76},
{20, 10, 8, char_77},
{18, 9, 6, char_78},
{19, 9, 21, char_79},
{17, 8, 11, char_80},
{19, 9, 23, char_81},
{17, 8, 14, char_82},
{17, 8, 20, char_83},
{15, 7, 4, char_84},
{18, 9, 10, char_85},
{17, 8, 4, char_86},
{22, 11, 8, char_87},
{17, 8, 4, char_88},
{17, 8, 5, char_89},
{17, 8, 6, char_90},
{7, 3, 8, char_91},
{14, 7, 2, char_92},
{8, 4, 8, char_93},
{19, 9, 6, char_94},
{17, 8, 2, char_95},
{6, 3, 7, char_96},
{16, 8, 16, char_97},
{15, 7, 16, char_98},
{15, 7, 14, char_99},
{16, 8, 16, char_100},
{15, 7, 17, char_101},
{10, 5, 7, char_102},
{16, 8, 21, char_103},
{15, 7, 9, char_104},
{7, 3, 7, char_105},
{9, 4, 10, char_106},
{13, 6, 6, char_107},
{4, 2, 2, char_108},
{26, 13, 16, char_109},
{15, 7, 9, char_110},
{16, 8, 17, char_111},
{15, 7, 16, char_112},
{16, 8, 16, char_113},
{9, 4, 7, char_114},
{14, 7, 17, char_115},
{10, 5, 7, char_116},
{15, 7, 9, char_117},
{14, 7, 4, char_118},
{19, 9, 8, char_119},
{14, 7, 4, char_120},
{15, 7, 8, char_121},
{14, 7, 6, char_122},
{10, 5, 37, char_123},
{4, 2, 2, char_124},
{9, 4, 37, char_125},
{14, 7, 4, char_126},
{16, 8, 8, char_127},
{18, 9, 30, char_128},
{15, 7, 19, char_129},
{15, 7, 24, char_130},
{18, 9, 21, char_131},
{16, 8, 26, char_132},
{16, 8, 23, char_133},
{16, 8, 23, char_134},
{15, 7, 21, char_135},
{18, 9, 22, char_136},
{15, 7, 27, char_137},
{15, 7, 24, char_138},
{12, 6, 12, char_139},
{16, 8, 7, char_140},
{7, 3, 9, char_141},
{17, 8, 15, char_142},
{17, 8, 12, char_143},
{15, 7, 13, char_144},
{28, 14, 33, char_145},
{26, 13, 10, char_146},
{16, 8, 22, char_147},
{16, 8, 27, char_148},
{16, 8, 24, char_149},
{17, 8, 14, char_150},
{15, 7, 16, char_151},
{15, 7, 18, char_152},
{19, 9, 31, char_153},
{18, 9, 20, char_154},
{16, 8, 19, char_155},
{21, 10, 12, char_156},
{19, 9, 24, char_157},
{21, 10, 18, char_158},
{22, 11, 14, char_159},
{16, 8, 23, char_160},
{7, 3, 9, char_161},
{16, 8, 24, char_162},
{15, 7, 16, char_163},
{17, 8, 13, char_164},
{18, 9, 8, char_165},
{16, 8, 18, char_166},
{16, 8, 17, char_167},
{15, 7, 19, char_168},
{16, 8, 7, char_169},
{16, 8, 7, char_170},
{19, 9, 15, char_171},
{19, 9, 10, char_172},
{6, 3, 7, char_173},
{19, 9, 6, char_174},
{19, 9, 6, char_175},
{14, 7, 126, char_176},
{16, 8, 252, char_177},
{24, 12, 276, char_178},
{5, 2, 2, char_179},
{13, 6, 4, char_180},
{13, 6, 6, char_181},
{21, 10, 6, char_182},
{21, 10, 5, char_183},
{13, 6, 5, char_184},
{21, 10, 10, char_185},
{20, 10, 4, char_186},
{21, 10, 6, char_187},
{21, 10, 6, char_188},
{21, 10, 5, char_189},
{13, 6, 5, char_190},
{0, 0, 3, char_191},
{8, 4, 3, char_192},
{16, 8, 5, char_193},
{16, 8, 5, char_194},
{8, 4, 4, char_195},
{16, 8, 2, char_196},
{16, 8, 4, char_197},
{8, 4, 6, char_198},
{16, 8, 6, char_199},
{16, 8, 6, char_200},
{16, 8, 6, char_201},
{24, 12, 8, char_202},
{24, 12, 8, char_203},
{16, 8, 8, char_204},
{16, 8, 4, char_205},
{24, 12, 12, char_206},
{16, 8, 7, char_207},
{16, 8, 6, char_208},
{16, 8, 7, char_209},
{16, 8, 6, char_210},
{16, 8, 5, char_211},
{8, 4, 5, char_212},
{8, 4, 5, char_213},
{16, 8, 5, char_214},
{24, 12, 6, char_215},
{16, 8, 6, char_216},
{13, 6, 3, char_217},
{8, 4, 3, char_218},
{16, 8, 39, char_219},
{16, 8, 35, char_220},
{8, 4, 19, char_221},
{17, 8, 18, char_222},
{16, 8, 35, char_223},
{22, 11, 15, char_224},
{18, 9, 13, char_225},
{14, 7, 4, char_226},
{18, 9, 6, char_227},
{18, 9, 7, char_228},
{24, 12, 18, char_229},
{18, 9, 12, char_230},
{18, 9, 10, char_231},
{18, 9, 27, char_232},
{21, 10, 23, char_233},
{21, 10, 20, char_234},
{18, 9, 19, char_235},
{29, 14, 30, char_236},
{16, 8, 19, char_237},
{17, 8, 9, char_238},
{19, 9, 10, char_239},
{23, 11, 6, char_240},
{23, 11, 6, char_241},
{23, 11, 5, char_242},
{24, 12, 5, char_243},
{13, 6, 7, char_244},
{14, 7, 7, char_245},
{23, 11, 12, char_246},
{18, 9, 8, char_247},
{18, 9, 17, char_248},
{7, 3, 9, char_249},
{7, 3, 10, char_250},
{18, 9, 5, char_251},
{15, 7, 9, char_252},
{11, 5, 9, char_253},
{13, 6, 19, char_254},
{ 0, 0, 0, 0}
};

/******************************************************/
/* inicializacao & controle                           */
/******************************************************/

static void ReleaseFontChars(cdPrivateVectorFont *fnt)
{
  int c;

  for (c=0; c<256; c++)
  {
    if (fnt->chars[c].p)
      free(fnt->chars[c].p);
  }

  free(fnt->chars);
}

static void SetDefaultFont(cdPrivateVectorFont *fnt)
{
  if (fnt->chars && fnt->chars != default_chars) 
    ReleaseFontChars(fnt);

  strcpy(fnt->name, "Simplex II");
  fnt->file_name[0] = 0;
  fnt->chars        = default_chars;
  fnt->top          = default_top;
  fnt->cap          = default_cap;
  fnt->half         = default_half;
  fnt->bottom       = default_bottom;
  fnt->point_size_x = 1.0;
  fnt->point_size_y = 1.0;
  fnt->current_cos  = 1.0;
  fnt->current_sin  = 0.0;
  fnt->space        = 1;
  fnt->line_space   = 1;
}

static int ReadFont(FILE *file, cdPrivateVectorFont *fnt)
{
  int c, right, center, operations;

  if (fnt->chars && fnt->chars != default_chars) 
    ReleaseFontChars(fnt);

  fnt->chars = (cdCaracter *)malloc(256*sizeof(cdCaracter));
  if (!fnt->chars) 
    return 0;

  if (fscanf(file,"%d%d%d%d",&fnt->top,&fnt->cap,&fnt->half,&fnt->bottom) != 4)
  {
    if (fscanf(file, "%[^\n]", fnt->name) != 1)
      return 0;
    if (fscanf(file,"%d%d%d%d",&fnt->top,&fnt->cap,&fnt->half,&fnt->bottom)!=4)
      return 0;
  }
  else 
    sprintf(fnt->name, "Unknown");

  for (c=0; c<256; c++)
  {
    fnt->chars[c].right = 0;
    fnt->chars[c].center = 0;
    fnt->chars[c].operations = 0;
    fnt->chars[c].p = NULL;
  }

  while (fscanf(file, "%d%d%d%d", &c, &right, &center, &operations) == 4)
  {
    fnt->chars[c].right = right;
    fnt->chars[c].center = center;
    fnt->chars[c].operations = operations;
    if (operations)
    {
      int i;
      fnt->chars[c].p = (cdOperation *)malloc(operations*sizeof(cdOperation));
      if (!fnt->chars[c].p) return 0;
      for (i=0; i<operations; i++)
      {
        char operation;
        int x, y;

        if (fscanf(file, "\n%c%d%d", &operation, &x, &y) != 3)
          return 0;

        fnt->chars[c].p[i].operation = operation;
        fnt->chars[c].p[i].x = (signed char)x;
        fnt->chars[c].p[i].y = (signed char)y;
      }
    }
  }

  return 1;
}

static int primlen(cdPrivateVectorFont *fnt, char* s)
{
  int len = 0;
  while (*s)
    len += fnt->chars[(unsigned char)(*(s++))].right + fnt->space;
  return len;
}

static void move_dir(cdPrivateVectorFont *fnt, int *px, int *py, double dx, double dy)
{
  *px += (int)(fnt->current_cos*dx - fnt->current_sin*dy);
  *py += (int)(fnt->current_sin*dx + fnt->current_cos*dy);
}

static void wmove_dir(cdPrivateVectorFont *fnt, double *px, double *py, double dx, double dy)
{
  *px += fnt->current_cos*dx - fnt->current_sin*dy;
  *py += fnt->current_sin*dx + fnt->current_cos*dy;
}

static void writechar(cdPrivateVectorFont *fnt, char c, int *px, int *py)
{
  unsigned char ac = ansi2ascii[(unsigned char)c];
  cdOperation *current = fnt->chars[ac].p;
  int m, op = fnt->chars[ac].operations;

  for(m = 0; m < op; m++)
  {
    int ponto_x = *px;
    int ponto_y = *py;

    if (current->operation == 'm')
    {
      if (m) cdEnd();
      cdBegin(CD_OPEN_LINES);
    }

    move_dir(fnt, &ponto_x, &ponto_y, current->x*fnt->point_size_x, current->y*fnt->point_size_y);

    if (fnt->text_transf)
    {
      double aux = ponto_x*fnt->text_matrix[3] + ponto_y*fnt->text_matrix[4] + fnt->text_matrix[5];
      ponto_y = (int)(ponto_x*fnt->text_matrix[0] + ponto_y*fnt->text_matrix[1] + fnt->text_matrix[2]);
      ponto_x = (int)aux;
    }

    cdVertex((int)ponto_x, (int)ponto_y);
    current++;
  }

  if (m) cdEnd();
}

static void wwritechar(cdPrivateVectorFont *fnt, char c, double *px, double *py)
{
  unsigned char ac = ansi2ascii[(unsigned char)c];
  cdOperation *current = fnt->chars[ac].p;
  int m, op = fnt->chars[ac].operations;

  for(m = 0; m < op; m++)
  {
    double ponto_x = *px;
    double ponto_y = *py;

    if (current->operation == 'm')
    {
      if (m) cdEnd();
      cdBegin(CD_OPEN_LINES);
    }

    wmove_dir(fnt, &ponto_x, &ponto_y, current->x*fnt->point_size_x, current->y*fnt->point_size_y);

    if (fnt->text_transf)
    {
      double aux = ponto_x*fnt->text_matrix[3] + ponto_y*fnt->text_matrix[4] + fnt->text_matrix[5];
      ponto_y = ponto_x*fnt->text_matrix[0] + ponto_y*fnt->text_matrix[1] + fnt->text_matrix[2];
      ponto_x = aux;
    }

    wdVertex(ponto_x, ponto_y);
    current++;
  }

  if (m) cdEnd();
}

static int lines(char * s)
{
  int n = 1;
  while (*s != 0)
  {
    if (*s == '\n')
    {
      n++;
      *s = 0;
    }
    s++;
  }
  return n;
}

static void basic_write(cdPrivateVectorFont *fnt, char* s, int px, int py)
{
  while (*s)
  {
    writechar(fnt, *s, &px, &py);
    move_dir(fnt, &px, &py, (fnt->chars[(unsigned char)*s].right + fnt->space)*fnt->point_size_x, 0);
    s++;
  }
}

static void wbasic_write(cdPrivateVectorFont *fnt, char* s, double px, double py)
{
  while (*s)
  {
    wwritechar(fnt, *s, &px, &py);
    wmove_dir(fnt, &px, &py, (fnt->chars[(unsigned char)*s].right + fnt->space)*fnt->point_size_x, 0);
    s++;
  }
}

static void calc_pos(cdPrivateVectorFont *fnt, int *px, int *py, int prim_len)
{
  int align=cdTextAlignment(CD_QUERY);

  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
  {
    move_dir(fnt, px, py, 0, -fnt->top*fnt->point_size_y);
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
  {
    move_dir(fnt, px, py, 0, -fnt->bottom*fnt->point_size_y);  /* bottom is < 0 */
  }
  else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT)
  {
    /* py = py; */
  }
  else /* center em y */
    move_dir(fnt, px, py, 0, -(double)(fnt->cap+fnt->bottom)/2*fnt->point_size_y);

  if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT)
  {
    move_dir(fnt, px, py, -prim_len*fnt->point_size_x, 0);
  }
  else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT)
  {
    ; /* px = px; */
  }
  else /* center em x */
    move_dir(fnt, px, py, -(prim_len*fnt->point_size_x)/2, 0);
}

static void wcalc_pos(cdPrivateVectorFont *fnt, double *px, double *py, int prim_len)
{
  int align=cdTextAlignment(CD_QUERY);

  if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
  {
    wmove_dir(fnt, px, py, 0, -fnt->top*fnt->point_size_y);
  }
  else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
  {
    wmove_dir(fnt, px, py, 0, -fnt->bottom*fnt->point_size_y);  /* bottom is < 0 */
  }
  else if (align == CD_BASE_CENTER || align == CD_BASE_LEFT || align == CD_BASE_RIGHT)
  {
    /* py = py; */
  }
  else /* center em y */
    wmove_dir(fnt, px, py, 0, -(double)(fnt->cap+fnt->bottom)/2*fnt->point_size_y);

  if (align == CD_EAST || align == CD_NORTH_EAST || align == CD_SOUTH_EAST || align == CD_BASE_RIGHT)
  {
    wmove_dir(fnt, px, py, -prim_len*fnt->point_size_x, 0);
  }
  else if (align == CD_WEST || align == CD_NORTH_WEST || align == CD_SOUTH_WEST || align == CD_BASE_LEFT)
  {
    ; /* px = px; */
  }
  else /* center em x */
    wmove_dir(fnt, px, py, -(prim_len*fnt->point_size_x)/2, 0);
}

static void calc_point(cdPrivateVectorFont *fnt, int startx, int starty, int *px, int *py, int dx, int dy)
{
  *px = startx;
  *py = starty;
  move_dir(fnt, px, py, dx, dy);

  if (fnt->text_transf)
  {
    double aux = *px * fnt->text_matrix[3] + *py * fnt->text_matrix[4] + fnt->text_matrix[5];
    *py = (int) (*px * fnt->text_matrix[0] + *py * fnt->text_matrix[1] + fnt->text_matrix[2]);
    *px = (int)aux;
  }
}

static void wcalc_point(cdPrivateVectorFont *fnt, double startx, double starty, double *px, double *py, double dx, double dy)
{
  *px = startx;
  *py = starty;

  wmove_dir(fnt, px, py, dx, dy);

  if (fnt->text_transf)
  {
    double aux = *px * fnt->text_matrix[3] + *py * fnt->text_matrix[4] + fnt->text_matrix[5];
    *py = *px * fnt->text_matrix[0] + *py * fnt->text_matrix[1] + fnt->text_matrix[2];
    *px = aux;
  }
}

static char *getCdDir(void)
{
  static char *env = NULL;
  if (env) return env;
  env = getenv("CDDIR");
  if (!env) env = ".";
  return env;
}

/******************************************************/
/* vector text                                        */
/******************************************************/

#define MAXLEN   500

static cdPrivateVectorFont *active_font = NULL;
static cdPrivateCanvas *active_private_canvas = NULL;

void* cdCreateVectorFont(void)
{
  void* vector_font_data;
  vector_font_data = malloc(sizeof(cdPrivateVectorFont));
  memset(vector_font_data, 0, sizeof(cdPrivateVectorFont));
  SetDefaultFont((cdPrivateVectorFont*)vector_font_data);
  return vector_font_data;
}

void cdKillVectorFont(void* vector_font_data)
{
  cdPrivateVectorFont *fnt = vector_font_data;

  if (fnt->file_name[0] != 0)
    ReleaseFontChars(fnt);

  free(fnt);
}

void cdActivateVectorFont(cdPrivateCanvas* cnv)
{
  active_private_canvas = cnv;

  if (cnv)
    active_font = (cdPrivateVectorFont*)cnv->vector_font_data;
  else
    active_font = NULL;
}

void cdVectorTextDirection(int x1, int y1, int x2, int y2)
{
  int dx=x2-x1;
  int dy=y2-y1;
  double len = sqrt(dx*dx +dy*dy);
  active_font->current_sin = dy/len;
  active_font->current_cos = dx/len;

  if (active_private_canvas->VectorTextDirection)
    active_private_canvas->VectorTextDirection(x1, y1, x2, y2);
}

int cdVectorCharSize(int size)
{
  int old_size = (int)(active_font->point_size_y*active_font->top);
  if (size == CD_QUERY) 
    return old_size;

  active_font->point_size_y = size/(double)active_font->top;
  active_font->point_size_x = size/(double)active_font->top;

  if (active_private_canvas->VectorCharSize)
    active_private_canvas->VectorCharSize(size);

  return old_size;
}

double* cdVectorTextTransform(double* matrix)
{
  int i;
  static double old_matrix[6];

  if (active_font->text_transf)
  {
    for (i=0; i<6; i++)
      old_matrix[i] = active_font->text_matrix[i];
  }
  else
  {
    old_matrix[0] = 1; old_matrix[1] = 0; old_matrix[2] = 0;
    old_matrix[3] = 0; old_matrix[4] = 1; old_matrix[5] = 0;
  }

  if (matrix)
  {
    for (i=0; i<6; i++)
      active_font->text_matrix[i] = matrix[i];

    active_font->text_transf = 1;
  }
  else
    active_font->text_transf = 0;

  if (active_private_canvas->VectorTextTransform)
    active_private_canvas->VectorTextTransform(matrix);

  return old_matrix;
}

void cdGetVectorTextSize(char *s, int *px, int *py)
{
  if (px) *px = (int)(primlen(active_font, s)*active_font->point_size_x);
  if (py) *py = (int)(active_font->top*active_font->point_size_y);
}

void cdGetVectorTextBounds(char *s, int px, int py, int *rect)
{
  int prim_len = primlen(active_font, s);
  int sx = (int)(prim_len*active_font->point_size_x);
  int sy = (int)(active_font->top*active_font->point_size_y);

  calc_pos(active_font, &px, &py, prim_len);

  move_dir(active_font, &px, &py, 0, active_font->bottom*active_font->point_size_y);

  calc_point(active_font, px, py, &rect[0], &rect[1], 0, 0);
  calc_point(active_font, px, py, &rect[2], &rect[3], sx, 0);
  calc_point(active_font, px, py, &rect[4], &rect[5], sx, sy);
  calc_point(active_font, px, py, &rect[6], &rect[7], 0, sy);
}

void cdVectorTextSize(int size_x, int size_y, char* s)
{
  active_font->point_size_x = size_x/(double)primlen(active_font, s);
  active_font->point_size_y = size_y/(double)active_font->top;

  if (active_private_canvas->VectorTextSize)
    active_private_canvas->VectorTextSize(size_x, size_y, s);
}

void cdVectorText(int px, int py, char* s)
{
  if (active_private_canvas->VectorText)
    active_private_canvas->VectorText(px, py, s);
  else
  {
    int prim_len = primlen(active_font, s);
    calc_pos(active_font, &px, &py, prim_len);
    basic_write(active_font, s, px, py);
  }
}

void cdMultiLineVectorText(int px, int py, char* s)
{
  if (active_private_canvas->MultiLineVectorText)
    active_private_canvas->MultiLineVectorText(px, py, s);
  else
  {
    double line_height = (active_font->top - active_font->bottom + active_font->line_space) * active_font->point_size_y;
    char buff[MAXLEN];
    char *str = buff;
    int n;

    int align=cdTextAlignment(CD_QUERY); /* procura o alinhamento do CD */

    if (strlen(s) >= MAXLEN)
      return;

    strcpy(str, s);
    n = lines(str);
    if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
    {
      ; /* Already at position */
    }
    else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
    {
      move_dir(active_font, &px, &py, 0, (n-1)*line_height);
    }
    else
      move_dir(active_font, &px, &py, 0, ((double)(n-1)/2)*line_height);

    while (n--)
    {
      cdVectorText(px, py, str);
      str += strlen(str)+1;
      move_dir(active_font, &px, &py, 0, -line_height);
    }
  }
}

char *cdVectorFont(char *file)
{
  if (active_private_canvas->VectorFont)
    return active_private_canvas->VectorFont(file);
  else
  {
    if (!file) 
    {
      SetDefaultFont(active_font);
      active_font->file_name[0] = 0;
    }
    else
    {
      char filename[512];
      FILE *font = NULL;

      /* se arquivo foi o mesmo que o arq. corrente, entao retorna */
      if (strcmp (file, active_font->file_name) == 0)
          return active_font->name;

      /* guarda nome do arquivo que esta' carregado */
      strcpy (active_font->file_name, file);

      /* abre arq. no dir. corrente */
      font = fopen(file, "r");

      /* se nao conseguiu, abre arq. no dir. do cd, */
      if (!font)
      {
        sprintf(filename, "%s/%s", getCdDir(), file);
        font = fopen(filename, "r");
      }

      /* arquivo aberto, carrega fonte */
      if (!font || !ReadFont(font, active_font))
      {
        if (font) fclose(font);
        SetDefaultFont(active_font);
        active_font->file_name[0] = 0;
        return NULL;
      }

      fclose(font);
    }

    return active_font->name;
  }
}

/******************************************************/
/* vector text em WC                                  */
/******************************************************/

void wdVectorTextDirection( double x1, double y1, double x2, double y2)
{
  double dx=x2-x1;
  double dy=y2-y1;
  double len = sqrt(dx*dx +dy*dy);
  active_font->current_sin = dy/len;
  active_font->current_cos = dx/len;

  if (active_private_canvas->wVectorTextDirection)
    active_private_canvas->wVectorTextDirection(x1, y1, x2, y2);
}

double wdVectorCharSize(double size)
{
  double old_size = active_font->point_size_y*active_font->top;
  if (size == CD_QUERY) 
    return old_size;

  active_font->point_size_y = size/(double)active_font->top;
  active_font->point_size_x = size/(double)active_font->top;

  if (active_private_canvas->wVectorCharSize)
    active_private_canvas->wVectorCharSize(size);

  return old_size;
}

void wdVectorTextSize(double size_x, double size_y, char* s)
{
  active_font->point_size_x = size_x/(double)primlen(active_font, s);
  active_font->point_size_y = size_y/(double)active_font->top;

  if (active_private_canvas->wVectorTextSize)
    active_private_canvas->wVectorTextSize(size_x, size_y, s);
}

void wdGetVectorTextSize(char *s, double *px, double *py)
{
  if (px) *px = primlen(active_font, s)*active_font->point_size_x;
  if (py) *py = active_font->top*active_font->point_size_y;
}

void wdGetVectorTextBounds(char *s, double px, double py, double *rect)
{
  int prim_len = primlen(active_font, s);
  double sx = prim_len*active_font->point_size_x;
  double sy = active_font->top*active_font->point_size_y;

  wcalc_pos(active_font, &px, &py, prim_len);

  wmove_dir(active_font, &px, &py, 0, active_font->bottom*active_font->point_size_y);

  wcalc_point(active_font, px, py, &rect[0], &rect[1], 0, 0);
  wcalc_point(active_font, px, py, &rect[2], &rect[3], sx, 0);
  wcalc_point(active_font, px, py, &rect[4], &rect[5], sx, sy);
  wcalc_point(active_font, px, py, &rect[6], &rect[7], 0, sy);
}

#undef wdVectorTextTransform
double* wdVectorTextTransform(double* matrix)
{
  return cdVectorTextTransform(matrix);
}

void wdVectorText(double px, double py, char* s)
{
  if (active_private_canvas->wVectorText)
    active_private_canvas->wVectorText(px, py, s);
  else
  {
    int prim_len = primlen(active_font, s);
    wcalc_pos(active_font, &px, &py, prim_len);
    wbasic_write(active_font, s, px, py);
  }
}

void wdMultiLineVectorText( double px, double py, char* s)
{
  if (active_private_canvas->wMultiLineVectorText)
    active_private_canvas->wMultiLineVectorText(px, py, s);
  else
  {
    double line_height = (active_font->top - active_font->bottom + active_font->line_space)*active_font->point_size_y;
    char buff[MAXLEN];
    char *str = buff;
    int n;

    int align=cdTextAlignment(CD_QUERY); /* procura o alinhamento do CD */

    if (strlen(s) >= MAXLEN)
      return;

    strcpy(str, s);
    n = lines(str);
    if (align == CD_NORTH || align == CD_NORTH_EAST || align == CD_NORTH_WEST)
    {
      ; /* Already at position */
    }
    else if (align == CD_SOUTH || align == CD_SOUTH_EAST || align == CD_SOUTH_WEST)
    {
      wmove_dir(active_font, &px, &py, 0, (n-1)*line_height);
    }
    else
      wmove_dir(active_font, &px, &py, 0, ((double)(n-1)/2)*line_height);

    while (n--)
    {
      wdVectorText(px, py, str);
      str += strlen(str)+1;
      wmove_dir(active_font, &px, &py, 0, -line_height);
    }
  }
}

